paper-listbox icon indicating copy to clipboard operation
paper-listbox copied to clipboard

paper-listbox steals focus from paper-input

Open davidmaxwaterman opened this issue 7 years ago • 0 comments

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

  1. load example demo
  2. click 'OPEN DIALOG'
  3. click in input field
  4. type 's' (the first letter of 'SOME TEXT' which is the item in the paper-listbox)

notice the focus changes to the 'SOME TEXT'

  1. click on 'workaround' to set the paper-listbox's attr-for-item-title property to '-'.
  2. open the dialog again
  3. now you can type 's' without any problem.

Browsers Affected

  • [X] Chrome
  • [ ] Firefox
  • [ ] Safari 9
  • [ ] Safari 8
  • [ ] Safari 7
  • [ ] Edge
  • [ ] IE 11
  • [ ] IE 10

davidmaxwaterman avatar May 15 '17 08:05 davidmaxwaterman