Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent accidental closing modal before saving #92

Open
tu2-atmanand opened this issue Nov 29, 2024 · 0 comments
Open

Prevent accidental closing modal before saving #92

tu2-atmanand opened this issue Nov 29, 2024 · 0 comments
Labels
enhancement An existing feature can be enhanced/improved. feature New feature or request Prioritize Extra attention is needed

Comments

@tu2-atmanand
Copy link
Owner

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.

  • If user has made any changes in the modal, keep a status variable contentEdited to detect this.
  • If the 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.
  • If the 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.

@tu2-atmanand tu2-atmanand added enhancement An existing feature can be enhanced/improved. feature New feature or request Prioritize Extra attention is needed labels Nov 29, 2024
@tu2-atmanand tu2-atmanand moved this to Important Backlog in Task Board Dev Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An existing feature can be enhanced/improved. feature New feature or request Prioritize Extra attention is needed
Projects
Status: Important Backlog
Development

No branches or pull requests

1 participant