dijit
dijit copied to clipboard
_SearchMixin/_AutoCompleteMixin fails to autocomplete value of "8"
I'm using a FilteringSelect with a set of predefined values [{id:'1',label:'1-the value'},...,{id:'8',label:'8-lorem ipsum'}
Autocomplete is turned on.
If the user types '1', the label autocompletes and when pressing TAB, the value is set.
BUT - when typing '8', the value is not autocompleted and the value needs to be selected manually.
after some debugging I tracked it down to _SearchMixin._processInput()
- there the /*boolean*/_prev_key_backspace
flag is being calculated.
when typing '8', the keycode is "8" - when comparing it with dojo/keys.BACKSPACE
because of auto(un)boxing, "8" equals 8 - and therefore the autocomplete code in _AutoCompleteMixin._openResultList()
gets skipped.
proposed solution: use === to compare the charOrCode with the key-constant.