{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/96","repository_url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior","labels_url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/96/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/96/events","html_url":"https://github.com/PolymerElements/iron-menu-behavior/issues/96","id":269189919,"number":96,"title":"Feature Request: Opt out of fucus() on _focusedItemChanged","user":{"login":"jpodwys","id":5660076,"avatar_url":"https://avatars0.githubusercontent.com/u/5660076?v=4","gravatar_id":"","url":"https://api.github.com/users/jpodwys","html_url":"https://github.com/jpodwys","followers_url":"https://api.github.com/users/jpodwys/followers","following_url":"https://api.github.com/users/jpodwys/following{/other_user}","gists_url":"https://api.github.com/users/jpodwys/gists{/gist_id}","starred_url":"https://api.github.com/users/jpodwys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpodwys/subscriptions","organizations_url":"https://api.github.com/users/jpodwys/orgs","repos_url":"https://api.github.com/users/jpodwys/repos","events_url":"https://api.github.com/users/jpodwys/events{/privacy}","received_events_url":"https://api.github.com/users/jpodwys/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-27T18:06:09Z","updated_at":"2017-11-27T17:02:40Z","closed_at":null,"author_association":"NONE","body":"<!-- Instructions: https://github.com/PolymerElements/iron-menu-behavior/CONTRIBUTING.md#filing-issues -->\r\n### Description\r\n\r\nCurrently, calling `paper-listbox.select(n);` [causes the referenced list item to receive focus](https://github.com/PolymerElements/iron-menu-behavior/blob/master/iron-menu-behavior.html#L275). 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.\r\n\r\n#### More Info\r\n\r\nI 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.\r\n\r\n### Expected outcome\r\n\r\nI 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.\r\n\r\n### Live Demo\r\n![demo](https://user-images.githubusercontent.com/5660076/32118134-de15af32-bb0d-11e7-8af1-6084a4d0ab42.gif)\r\n\r\n### Steps to reproduce\r\n\r\n1. Drop [this element](https://github.com/FamilySearchElements/birch-typeahead) onto a page\r\n2. Wire it up to set its `options` property when a user types (preferably with a slight delay simulating a network call)\r\n3. Enable IME for Chinese\r\n4. Type \"1990n\" into the input in such a way that [this line](https://github.com/FamilySearchElements/birch-typeahead/blob/master/birch-typeahead.html#L315) of code executes after typing the \"n\"\r\n5. Notice that `iron-menu-behavior` blurs the input causing the IME menu to disappear as seen in the gif above\r\n\r\n### Browsers Affected\r\n<!-- Check all that apply -->\r\n- [x] Chrome\r\n- [x] Firefox\r\n(Did not test others)\r\n"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/comments/347249494","html_url":"https://github.com/PolymerElements/iron-menu-behavior/issues/96#issuecomment-347249494","issue_url":"https://api.github.com/repos/PolymerElements/iron-menu-behavior/issues/96","id":347249494,"user":{"login":"jpodwys","id":5660076,"avatar_url":"https://avatars0.githubusercontent.com/u/5660076?v=4","gravatar_id":"","url":"https://api.github.com/users/jpodwys","html_url":"https://github.com/jpodwys","followers_url":"https://api.github.com/users/jpodwys/followers","following_url":"https://api.github.com/users/jpodwys/following{/other_user}","gists_url":"https://api.github.com/users/jpodwys/gists{/gist_id}","starred_url":"https://api.github.com/users/jpodwys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpodwys/subscriptions","organizations_url":"https://api.github.com/users/jpodwys/orgs","repos_url":"https://api.github.com/users/jpodwys/repos","events_url":"https://api.github.com/users/jpodwys/events{/privacy}","received_events_url":"https://api.github.com/users/jpodwys/received_events","type":"User","site_admin":false},"created_at":"2017-11-27T17:02:40Z","updated_at":"2017-11-27T17:02:40Z","author_association":"NONE","body":"Let's celebrate the one month anniversary of this issue/pr combo by merging my PR! What do ya say?\r\n\r\n@bicknellr @notwaldorf @cdata @rictic "}}
{"actor":{"display_login":"jpodwys"}}