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

Add a beforeunload hook to prevent leaving not-saved contents #21

Open
bago opened this issue Oct 21, 2015 · 3 comments
Open

Add a beforeunload hook to prevent leaving not-saved contents #21

bago opened this issue Oct 21, 2015 · 3 comments

Comments

@bago
Copy link
Member

bago commented Oct 21, 2015

We should add some hook so to alert users they are leaving the editor.

@bago bago added this to the 0.12 milestone Oct 21, 2015
@bwl21
Copy link
Contributor

bwl21 commented Nov 7, 2015

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.

@bago
Copy link
Member Author

bago commented Nov 7, 2015

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).

@bwl21
Copy link
Contributor

bwl21 commented Nov 28, 2015

Meanwhile I've lost some work. If you try download and there is a server error, the last unsaved content of editor is gone ...

@bago bago modified the milestones: 0.13, 0.12 Dec 5, 2015
@bago bago modified the milestones: 0.14, 0.13 Jan 16, 2016
@bago bago modified the milestones: 0.14, 0.15 Mar 4, 2016
@bago bago modified the milestones: 0.15, 0.16 Sep 5, 2016
@bago bago modified the milestones: 0.16, 0.17 Mar 20, 2017
@bago bago modified the milestones: 0.17, 0.18 Feb 28, 2018
@bago bago removed this from the 0.18 milestone Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants