mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "MobileArticleTarget teardown behavior is upstreamed to MobileFrontend"
This commit is contained in:
commit
329faab1e9
|
@ -435,23 +435,6 @@ ve.init.mw.MobileArticleTarget.prototype.tryTeardown = function () {
|
|||
this.overlay.onExitClick( $.Event() );
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.init.mw.MobileArticleTarget.prototype.teardown = function () {
|
||||
var target = this;
|
||||
// Parent method
|
||||
return ve.init.mw.MobileArticleTarget.super.prototype.teardown.call( this ).then( function () {
|
||||
if ( !target.isViewPage ) {
|
||||
var newUrl = new URL( target.viewUrl );
|
||||
if ( mw.config.get( 'wgIsRedirect' ) ) {
|
||||
newUrl.searchParams.set( 'redirect', 'no' );
|
||||
}
|
||||
location.href = newUrl;
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue