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
This commit is contained in:
@@ -4578,6 +4578,7 @@
|
|||||||
// showSaveWarning is set to 'false' when the page is saved.
|
// showSaveWarning is set to 'false' when the page is saved.
|
||||||
if (!curConfig.no_save_warning && Editor.showSaveWarning) {
|
if (!curConfig.no_save_warning && Editor.showSaveWarning) {
|
||||||
// Browser already asks question about closing the page
|
// 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;
|
return uiStrings.notification.unsavedChanges;
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user