Search fails to register keypresses with combo box closed
If the user tabs into a closed ui-select combo box and types quickly the keypresses may not register. The behavior gets worse the longer the list, though it doesn't take many items for the behavior to become consistent.
For example, the attached plunkr is the Basic example from the ui-select home page with $scope.people modified to be significantly longer. To replicate the issue place the cursor in the "Enter an address" field, press Tab then type "adr" quickly and notice the d and r often do not register.
It appears under the hood ui-select is reverting the search string. Debugging in the propsFilter shows it will search for "a" then "ad" then "adr" then "a" again.
Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/VBPQvQdsQ7bNUymNHLwp?p=preview
Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS
Directly from the Basic demo plunkr
Angular: 1.5.0
UI-Select: 0.19.5
Can you tell me it this is for all themes of the ui-select?
Yes, it affects all themes.
Here is some additional information that will hopefully expedite a fix. When the combo is closed (tab into it) and a key is pressed it is handled by
focusser.bind("keyup input", function(e){...}
If the rest of the search is typed slowly then all of the key inputs are received by
ctrl.searchInput.on('keydown', function(e) {...})
but if the rest is typed quickly the keydown handler is never called and $watch on $select.search is never triggered.
+1
I have huge issues with this as well. Many people complain that their characters get eaten away when typing when the dropdown is closed. So if anyone has some kind of workaround that I could implement to solve it, let me know. It is especially frustrating because this dropdown is used in a form that gets used very frequently, and thus efficiency is quite important. The form it is based in is also completely tab optimized to reduce the total number of keypresses needed.