mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Fix tab selection on monobook
Don't unselect article tab when loading VE, do unselect when restoring normal view mode. Bug: 49407 Change-Id: I4b6e5c898a8af2b404151bba46359dc4bfbd739e
This commit is contained in:
parent
d85317a710
commit
032d9d53ec
|
@ -1374,7 +1374,7 @@ ve.init.mw.ViewPageTarget.prototype.transformPage = function () {
|
|||
var uri;
|
||||
|
||||
// Put skin tabs in "edit" mode
|
||||
$( $( '#p-views' ).length ? '#p-views' : '#p-cactions' )
|
||||
$( '#p-views' )
|
||||
.find( 'li.selected' ).removeClass( 'selected' );
|
||||
$( '#ca-ve-edit' )
|
||||
.addClass( 'selected' );
|
||||
|
@ -1408,7 +1408,8 @@ ve.init.mw.ViewPageTarget.prototype.restorePage = function () {
|
|||
// Put skin tabs back in "view" mode
|
||||
$( $( '#p-views' ).length ? '#p-views' : '#p-cactions' )
|
||||
.find( 'li.selected' ).removeClass( 'selected' );
|
||||
$( '#ca-view' ).addClass( 'selected' );
|
||||
$( $( '#ca-view' ).length ? '#ca-view' : '#p-cactions > .pBody > ul > li:nth-child(1)' )
|
||||
.addClass( 'selected' );
|
||||
|
||||
// Make site notice visible again (if present)
|
||||
$( '#siteNotice.ve-hide' )
|
||||
|
|
Loading…
Reference in a new issue