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

Fix unsaved changes modal not closing after browser back #2984

Merged
merged 8 commits into from
Dec 9, 2022

Conversation

ndricimrr
Copy link
Contributor

@ndricimrr ndricimrr commented Nov 15, 2022

Description
When going back the handling is done but the dirty bit is not set back to false leading into 'endless loop' where the modal is re-created again and again after clicking yes.

Changes proposed in this pull request:

  • Using getUnsavedChangesModalPromise instead, to properly set dirt state back to false.
  • test
  • go back on empty history

Related issue(s)

Fixes #2964

@JohannesDoberer
Copy link
Contributor

JohannesDoberer commented Nov 18, 2022

Needs clarification:
What should happen if the unsafed change modal is active and user clicks on browser back button?
Currently modal stays active and the user is able to go back through the history (without route changes).

@JohannesDoberer JohannesDoberer added the decision Related to all issues that need a decision label Nov 21, 2022
@ndricimrr
Copy link
Contributor Author

decided to keep modal open on browser back (indirectly.).

@ndricimrr ndricimrr removed the decision Related to all issues that need a decision label Dec 5, 2022
Copy link
Contributor

@JohannesDoberer JohannesDoberer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@ndricimrr ndricimrr merged commit acda672 into master Dec 9, 2022
@ndricimrr ndricimrr deleted the 2964-unsaved-changes-modal-dissapear branch December 9, 2022 10:42
This was referenced Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsaved changes modal does not disappear using browser back
2 participants