Skip to content
Snippets Groups Projects
Commit 7d643c17 authored by Guy Brand's avatar Guy Brand
Browse files

Trap onbeforeunload when event fired (attempt to fix FS#2196)

parent f24af591
No related branches found
No related tags found
No related merge requests found
......@@ -320,9 +320,11 @@ addInitEvent(function (){
// reset change memory var on submit
addEvent($('edbtn__save'), 'click', function(){
window.onbeforeunload = '';
window.textChanged = false;
});
addEvent($('edbtn__preview'), 'click', function(){
window.onbeforeunload = '';
window.textChanged = false;
window.keepDraft = true; // needed to keep draft on page unload
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment