Merge "Fix sidebar losing focus when unchecking params with space"

This commit is contained in:
jenkins-bot 2022-07-20 09:40:31 +00:00 committed by Gerrit Code Review
commit 017aa1eea9
2 changed files with 8 additions and 4 deletions

View file

@ -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 );
}
};

View file

@ -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 );
}
}
};