mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 19:26:46 +00:00
Tear down the beforeUnload handler when redirecting after page creation
Change-Id: If182eb62068c3c585a98535cc6761d98ad7dd56d
This commit is contained in:
parent
f35c8adac8
commit
fba013bedf
|
@ -192,6 +192,7 @@ ve.init.ViewPageTarget.prototype.onLoadError = function( response, status, error
|
|||
ve.init.ViewPageTarget.prototype.onSave = function( html ) {
|
||||
if ( Number( mw.config.get( 'wgArticleId', 0 ) ) === 0 ) {
|
||||
// This is a page creation, refresh the page
|
||||
this.teardownBeforeUnloadHandler();
|
||||
window.location.href = this.viewUri;
|
||||
} else {
|
||||
// Update watch link to match 'watch checkbox' in save dialog.
|
||||
|
|
Loading…
Reference in a new issue