mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
MobileArticleTarget teardown behavior is upstreamed to MobileFrontend
Bug: T334263 Depends-On: If1ad6e88cf595ef3d3e54d41c00f0b79704be043 Change-Id: Idb95bfd2b71f5967396a1f36636b0a155dec2fb2
This commit is contained in:
parent
b986645d0a
commit
14b32181ea
|
@ -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