-
Notifications
You must be signed in to change notification settings - Fork 81
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
Bug: Navigating away from editors without saving loses changes #1389
Comments
@jmakowski1123 @lizc577 @sdaitzman @marcotuts This is ready for AC testing on the sandbox |
This is working as intended. When I opt to reload a page with the editor open from my browser, the reload takes me back to the library homepage, rather than keeping the editor modal open. Is that intended? I would expect that the editor would stay open? |
@jmakowski1123 Again apologies for not including the limitations of the implementation here. As mentioned in #1444, there are some limitations while blocking users from navigating away for editors like react-router not preserving the state and browsers not emitting the unload event in some cases.
Currently, this is the intended behaviour as we are not preserving the editor state before save. But it should be possible for us to reopen the editor on refresh if required. cc: @bradenmacdonald I also believe that it would be much better experience to preserve the editor state in localstorage and restore from it on refresh instead of blocking user but it is not simple to implement. |
@jmakowski1123 Is it okay to move it to Done? |
Reloading or otherwise using browser controls to navigate to another page loses unsaved changes with no confirmation. Can we intercept that event and warn the user they may lose unsaved changes in that case?
The text was updated successfully, but these errors were encountered: