-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Autocomplete touch devices issue #884
Comments
From Ember Basic Dropdown guides I found this http://ember-basic-dropdown.com/docs/dropdown-events And noticed that the method select from Power-select.js is being triggered when tapping outside of the trigger component, like something similar to onBlur, and the event passed is undefined so no clue what would be changing or triggering this programatically
And it happens before the onBlur |
Tracked it down to onInput, seems it gets triggered with the event "change". |
Found the root, handleInputLocal method in paper-autocomplete-trigger, sends the action select with null if there is something already selected, it turns that on touch devices, handleInputLocal gets triggered by tapping outside of the trigger, which leads to the bug because it replaces the selected item with null. My solution so far is to check for the type of the event, like this: /components/paper-autocomplete-trigger.js
Because the other way it gets called with event type "change", so checking for input ensures that the user is typing... OR Getting rid of onchange action binding in paper-autocomplete-trigger.hbs, because oninput and onchange trigger the handleInputLocal, but at least in all my use cases in touch devices, onchange setting null is not desired. |
I guess this is solved by #956 . Closing for now. |
Found a curious bug, while on touch devices (tested on Chrome devtools), if you click outside of the autocomplete after selecting an item from a dynamic list generated by a server query, the onSelectionChange method is executed again with a null item. This doesn't happen at all while on mouse devices, which makes this hard to debug. I also think this might be related to #767 and #787
The text was updated successfully, but these errors were encountered: