mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Merge "Fix sidebar losing focus when unchecking params with space"
This commit is contained in:
commit
017aa1eea9
|
@ -307,10 +307,8 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.removePages = function ( pages
|
|||
} );
|
||||
|
||||
this.stackLayout.removeItems( pagesToRemove );
|
||||
if ( isCurrentPageRemoved ) {
|
||||
this.setPage( isCurrentParameter ? null :
|
||||
nextSelectionCandidate || prevSelectionCandidate
|
||||
);
|
||||
if ( isCurrentPageRemoved && !isCurrentParameter ) {
|
||||
this.setPage( nextSelectionCandidate || prevSelectionCandidate );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -148,6 +148,12 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.markParameterAsUnused
|
|||
var item = paramName ? this.findItemFromData( paramName ) : null;
|
||||
if ( item ) {
|
||||
item.setSelected( false );
|
||||
paramName = paramName || null;
|
||||
// An unused parameter can't be the active (set) one; it doesn't exist in the content pane
|
||||
if ( this.itemSet === paramName ) {
|
||||
this.itemSet = null;
|
||||
item.setParameter( false );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue