From 6e5905370dd0aedd9c7f3e79527e182863865b5b Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Mon, 10 Feb 2014 13:45:48 +0000 Subject: [PATCH] Add e.returnValue in addEventListener('beforeunload') for sake of Firefox git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2680 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index b03458b2..6610230f 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -4578,6 +4578,7 @@ // showSaveWarning is set to 'false' when the page is saved. if (!curConfig.no_save_warning && Editor.showSaveWarning) { // Browser already asks question about closing the page + e.returnValue = uiStrings.notification.unsavedChanges; // Firefox needs this when beforeunload set by addEventListener (even though message is not used) return uiStrings.notification.unsavedChanges; } }, false);