You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I accidentally navigate away from the editor, there's no mechanism which asks me whether I want to really leave the page and lose my edits.
I tried to drag&drop an image from my desktop to the editor, but because I didn't point exactly, the browser thought I wanted to open the image, and navigated away from the editor. After pressing the back-button, my edits were lost.
The text was updated successfully, but these errors were encountered:
This problem has been partially solved with the "do you want to save"
dialog box, which appears when you click on a link in the editor
application.
For the rest such as the case you are mentionning, there is onunload
event, but at the time the event is sent, it don't allow such a dialog
box to appear and there is no way to prevent from navigating away. I
also tried to send an AJAX request to save the current document without
asking anything to the user when this event is fired, but it isn't
always desirable (what if I really want to go away without saving ?, and
it doesn't reliably work anyway:
If the new page is faster to load than the AJAX request, then the
AJAX request is cancelled before it arrives and thus nothing is saved.
There is the synchrone mode to solve the problem above, i.e. the
browser waits for the AJAX request to complete before navigating away.
But in this case, sometimes the browser hangs if the AJAX request takes
too long to complete. This is notably the case with IE.
If you have another suggestion, I would be happy to hear it.
When I accidentally navigate away from the editor, there's no mechanism which asks me whether I want to really leave the page and lose my edits.
I tried to drag&drop an image from my desktop to the editor, but because I didn't point exactly, the browser thought I wanted to open the image, and navigated away from the editor. After pressing the back-button, my edits were lost.
The text was updated successfully, but these errors were encountered: