Revert "Restore selection after keyboard parameter navigation"

We don't want to restore selection.  Instead, we'll remove all
parameter selections onFocus, in a later patch.

This reverts commit 787d44af66.

Bug: T312017
Change-Id: Ia1dc8061dfd1813a58befff5adc5c3882b54d8e2
This commit is contained in:
Adam Wight 2022-07-07 15:23:28 +02:00
parent fd86b7f38d
commit a83d37d864

View file

@ -7,7 +7,6 @@
* @constructor
* @param {Object} config
* @cfg {ve.ui.MWTransclusionOutlineParameterWidget[]} items
* @property {string|null} currentHighlight
*/
ve.ui.MWTransclusionOutlineParameterSelectWidget = function VeUiMWTransclusionOutlineParameterSelectWidget( config ) {
// Parent constructor
@ -25,7 +24,7 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget = function VeUiMWTransclusionOu
this.$element
.on( {
focus: this.bindDocumentKeyDownListener.bind( this ),
blur: this.onBlur.bind( this )
blur: this.unbindDocumentKeyDownListener.bind( this )
} );
// FIXME: Workaround to prevent the hover effect, because it causes explicit
@ -106,7 +105,6 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.findFirstSelectedItem
* @param {string} [paramName] Parameter name to highlight, e.g. "param1". Omit for no highlight.
*/
ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.highlightParameter = function ( paramName ) {
this.currentHighlight = paramName;
var item = this.findItemFromData( paramName );
// Intentionally drop any highlighting if the parameter can't be found
this.highlightItem( item );
@ -115,15 +113,6 @@ ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.highlightParameter =
}
};
/**
* Handle blur event by reapplying "select" highlighting.
*/
ve.ui.MWTransclusionOutlineParameterSelectWidget.prototype.onBlur = function () {
this.unbindDocumentKeyDownListener();
var item = this.findItemFromData( this.currentHighlight );
this.highlightItem( item );
};
/**
* @param {string} paramName
*/