-
Notifications
You must be signed in to change notification settings - Fork 503
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
Add a beforeunload hook to prevent leaving not-saved contents #21
Comments
If the user simply closes the tab or the even the browser, there is no chance for the hook. Therefore I propose to save to localstore upon each significant change. |
We found some user uses "backspace" key by mistake when the "content editable" is not active and this make the browser go to the previous page. Another option would be to intercept the backspace key.. but I'm not sure it would be better (I don't like altering the browser experience... if people wants to use backspace to go back then we'll break their habits.. a beforeunload would simply ask them a confirmation). |
Meanwhile I've lost some work. If you try download and there is a server error, the last unsaved content of editor is gone ... |
We should add some hook so to alert users they are leaving the editor.
The text was updated successfully, but these errors were encountered: