You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, calling paper-listbox.select(n);causes the referenced list item to receive focus. This is problematic when users are typing with IME because stealing focus from the input that triggers the OS-level IME popup causes that popup to disappear.
More Info
I have a date/location picker typeahead. When the user types into the input, I open a paper-listbox instance and programmatically select the first item for them. Because doing so steals focus, I then immediately replace focus to the input. However, blurring the input causes IME tools to disappear.
Expected outcome
I would like to have an opt-in way to prevent focus of the selected list item, perhaps via a property named preventFocusOnItemChanged or something similar. I'd like for the desired item to be highlighted, but not focused. I've put together #97 (which has a diff of only 9 lines added) to accomplish this.
jpodwys
changed the title
Feature Request: Opt out of fucus() on _focusedItemChanged
Feature Request: Opt out of focus() on _focusedItemChanged
Nov 27, 2017
Hi @jpodwys, have you considered listening for the down key and setting the selected item to the first when the user pushes that? I think that's the typical way to handle this scenario if this is a generic input field with suggested options. I think you can also set .selected directly to avoid the focusing behavior.
Description
Currently, calling
paper-listbox.select(n);
causes the referenced list item to receive focus. This is problematic when users are typing with IME because stealing focus from the input that triggers the OS-level IME popup causes that popup to disappear.More Info
I have a date/location picker typeahead. When the user types into the input, I open a
paper-listbox
instance and programmatically select the first item for them. Because doing so steals focus, I then immediately replace focus to the input. However, blurring the input causes IME tools to disappear.Expected outcome
I would like to have an opt-in way to prevent focus of the selected list item, perhaps via a property named
preventFocusOnItemChanged
or something similar. I'd like for the desired item to be highlighted, but not focused. I've put together #97 (which has a diff of only 9 lines added) to accomplish this.Live Demo
Steps to reproduce
options
property when a user types (preferably with a slight delay simulating a network call)iron-menu-behavior
blurs the input causing the IME menu to disappear as seen in the gif aboveBrowsers Affected
(Did not test others)
The text was updated successfully, but these errors were encountered: