NXP-10258: make sure save mechanism was triggered before leaving the page when editing a select2 widget