Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189499

Change subject: [BREAKING CHANGE] TextInputWidget: Remove 'icon' and 
'indicator' events
......................................................................

[BREAKING CHANGE] TextInputWidget: Remove 'icon' and 'indicator' events

The functionality they expose (user clicking on the icon/indicator) is
fundamentally not accessible: the icon/indicator has no tabindex, has
no keyboard events, has no label/tooltip associated, and has no
sensible way of fixing all of this.

If something needs to be clickable separately, it should probably be a
separate Widget with the appropriate mixins added.

DO NOT MERGE. We currently use this in ComboBoxWidget :/ (T87705).

Change-Id: I944bd1d3416b066b3283613d73fdf3dd61860c70
---
M src/widgets/TextInputWidget.js
1 file changed, 0 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/99/189499/1

diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 296880a..fd717dc 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -64,8 +64,6 @@
                blur: this.setValidityFlag.bind( this )
        } );
        this.$element.on( 'DOMNodeInsertedIntoDocument', 
this.onElementAttach.bind( this ) );
-       this.$icon.on( 'mousedown', this.onIconMouseDown.bind( this ) );
-       this.$indicator.on( 'mousedown', this.onIndicatorMouseDown.bind( this ) 
);
        this.on( 'labelChange', this.updatePosition.bind( this ) );
 
        // Initialization
@@ -112,47 +110,7 @@
  * @event enter
  */
 
-/**
- * User clicks the icon.
- *
- * @event icon
- */
-
-/**
- * User clicks the indicator.
- *
- * @event indicator
- */
-
 /* Methods */
-
-/**
- * Handle icon mouse down events.
- *
- * @param {jQuery.Event} e Mouse down event
- * @fires icon
- */
-OO.ui.TextInputWidget.prototype.onIconMouseDown = function ( e ) {
-       if ( e.which === 1 ) {
-               this.$input[ 0 ].focus();
-               this.emit( 'icon' );
-               return false;
-       }
-};
-
-/**
- * Handle indicator mouse down events.
- *
- * @param {jQuery.Event} e Mouse down event
- * @fires indicator
- */
-OO.ui.TextInputWidget.prototype.onIndicatorMouseDown = function ( e ) {
-       if ( e.which === 1 ) {
-               this.$input[ 0 ].focus();
-               this.emit( 'indicator' );
-               return false;
-       }
-};
 
 /**
  * Handle key press events.

-- 
To view, visit https://gerrit.wikimedia.org/r/189499
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I944bd1d3416b066b3283613d73fdf3dd61860c70
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to