Fix onInputChange being called twice
ULS input element had onInputChange() handler attached to change, textInput and input events. That caused onInputChange() to be called twice when there is user input and ULS gets closed, since 'change' event fires when <input type="text"> element loses focus. Registering handler only for 'input' is sufficient for the intent.
This commit is contained in:
1 parent
5dfca5fd8a
commit
44bd07f038
1 file changed
+1
-4
@@ -59,10 +59,7 @@
|
||||
|
||||
listen: function () {
|
||||
this.$element.on( 'keydown', this.keypress.bind( this ) );
|
||||
this.$element.on(
|
||||
'change textInput input',
|
||||
$.fn.uls.debounce( this.onInputChange.bind( this ), 300 )
|
||||
);
|
||||
this.$element.on( 'input', $.fn.uls.debounce( this.onInputChange.bind( this ), 300 ) );
|
||||
|
||||
if ( this.$clear.length ) {
|
||||
this.$clear.on( 'click', this.clear.bind( this ) );
|
||||
|
||||
Reference in new issue
Block a user