Prevent accidental closing modal before saving #92
Labels
enhancement
An existing feature can be enhanced/improved.
feature
New feature or request
Prioritize
Extra attention is needed
Various times it happens that, when a user is working on something important, and with hurry can make changes in the EditTaskModal, and without pressing save button might end up clicking outside the modal, which will close the modal and the edited content will be lost.
To solve this issue and give better user experience. I have following solution.
contentEdited
to detect this.contentEdited
is true and user has pressed save button, make the varioable false, so user can close the modal by clicking anywhere outside the modal.contentEdited
is true and user has saved the changes, and if user has clicked anywhere outside the modal, prevent modal from closing. Also open a pop-up with following message :There are unsaved changes.
Do you want to save the changes ?
Then keep two buttons, Save and Discard.
The text was updated successfully, but these errors were encountered: