mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "If VE was opened on action=edit URL, redirect to view URL when closing"
This commit is contained in:
commit
1a0ea50bd6
|
@ -675,6 +675,12 @@ ve.init.mw.DesktopArticleTarget.prototype.teardown = function ( trackMechanism )
|
|||
.removeClass( 've-init-mw-desktopArticleTarget-uneditableContent' );
|
||||
|
||||
mw.hook( 've.deactivationComplete' ).fire( target.edited );
|
||||
|
||||
if ( !target.isViewPage ) {
|
||||
location.href = target.viewUri.clone().extend( {
|
||||
redirect: mw.config.get( 'wgIsRedirect' ) ? 'no' : undefined
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue