paper-listbox
paper-listbox copied to clipboard
paper-listbox steals focus from paper-input
Description
From the paper-listbox docs:
https://www.webcomponents.org/element/polymerelements/paper-listbox
Typing the first letter of a listbox item will also focus it.
Under some circumstances, it can steal the focus from a paper-input, which is extraordinarily confusing for the developer.
Expected outcome
I expect to be able to click in a paper-input and type anything.
Actual outcome
Typing the first letter of one of the listbox items steals the focus.
Live Demo
https://plnkr.co/edit/wqwAAj?p=preview
Steps to reproduce
- load example demo
- click 'OPEN DIALOG'
- click in input field
- type 's' (the first letter of 'SOME TEXT' which is the item in the paper-listbox)
notice the focus changes to the 'SOME TEXT'
- click on 'workaround' to set the paper-listbox's
attr-for-item-title
property to '-'. - open the dialog again
- now you can type 's' without any problem.
Browsers Affected
- [X] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10