Merge "Prevent highlighting the first parameter when clicking to remove"

This commit is contained in:
jenkins-bot 2022-07-04 14:24:17 +00:00 committed by Gerrit Code Review
commit b380f84d42

View file

@ -140,8 +140,11 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.onCheckboxChange = fu
/**
* @inheritDoc OO.ui.SelectWidget
*/
ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.onFocus = function () {
if ( !this.findHighlightedItem() ) {
ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.onFocus = function ( event ) {
if ( event.target === this.$element[ 0 ] &&
!this.findHighlightedItem()
) {
// When tabbing into the selection list, highlight the first parameter.
this.highlightItem( this.items[ 0 ] );
}
// Don't call the parent. It makes assumptions that conflict with how we use selections.