mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
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:
parent
fd86b7f38d
commit
a83d37d864
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue