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:
Roan Kattouw 2014-08-28 14:38:49 -07:00
parent a9b01bdc8d
commit f0cadeca42

View file

@ -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' ) ) {