Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_SearchMixin/_AutoCompleteMixin fails to autocomplete value of "8" #185

Open
gerpres opened this issue Aug 28, 2020 · 0 comments
Open

_SearchMixin/_AutoCompleteMixin fails to autocomplete value of "8" #185

gerpres opened this issue Aug 28, 2020 · 0 comments

Comments

@gerpres
Copy link
Contributor

gerpres commented Aug 28, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant