mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Return undefined, not null from onbeforeunload
IE doesn't accept null as a "do nothing" value, only undefined. If you return null, it'll show a popup with the text "null". Change-Id: I984a7ded483c4c178cbca2a9af9abd895e6ded56
This commit is contained in:
parent
a9b01bdc8d
commit
f0cadeca42
|
@ -1618,7 +1618,7 @@ ve.init.mw.ViewPageTarget.prototype.saveEditSection = function ( heading ) {
|
|||
};
|
||||
|
||||
/**
|
||||
* Add onbeforunload handler.
|
||||
* Add onbeforeunload handler.
|
||||
*
|
||||
* @method
|
||||
*/
|
||||
|
@ -1726,7 +1726,7 @@ ve.init.mw.ViewPageTarget.prototype.onBeforeUnload = function () {
|
|||
} else {
|
||||
// Override if submitting
|
||||
if ( this.submitting ) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
// Check if there's been an edit
|
||||
if ( this.surface && this.edited && mw.user.options.get( 'useeditwarning' ) ) {
|
||||
|
|
Loading…
Reference in a new issue