mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing
To reproduce: start editing a page, turn it into a redirect,
cancel editing and go back to view mode. The "Redirect page"
subtitle under the page title should disappear.
Note that #redirectsub is correctly spelled all lowercase,
unlike #contentSub.
This reverts commit 0e1bc7309b
and fixes the code instead.
Change-Id: Ibacd73122dfec63268a77794bc77c4b88876d3ee
This commit is contained in:
parent
0e1bc7309b
commit
d905d705ce
|
@ -1360,6 +1360,7 @@ ve.init.mw.DesktopArticleTarget.prototype.restorePage = function () {
|
||||||
// Remove any VE-added redirectMsg
|
// Remove any VE-added redirectMsg
|
||||||
if ( $( '.mw-body-content > .ve-redirect-header' ).length ) {
|
if ( $( '.mw-body-content > .ve-redirect-header' ).length ) {
|
||||||
$( '.mw-body-content > .ve-redirect-header' ).remove();
|
$( '.mw-body-content > .ve-redirect-header' ).remove();
|
||||||
|
$( '#contentSub #redirectsub, #contentSub #redirectsub + br' ).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore any previous redirectMsg/redirectsub
|
// Restore any previous redirectMsg/redirectsub
|
||||||
|
|
Loading…
Reference in a new issue