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

Focusing the input not selecting the content

Open jasongardnerlv opened this issue 10 years ago • 2 comments

Noticing some strange focus behavior with paper-input.

http://jsbin.com/gehozu/edit?html,output

Steps to reproduce:

  1. Click once inside each input in the example (should produce the edit cursor each time).
  2. Click inside the first input again.
  3. Begin tabbing forward through the inputs. Notice that the content in the input does not get selected, instead it seems to recall where the cursor was previously.
  4. Then, shift+tab back onto an input and notice that the content gets selected.
  5. After at least one shift+tab, any subsequent tab or shift+tab will properly select the content.

This is different than the way native inputs behave (which always select the content on focus, AFAICT)

http://jsbin.com/kepupa/edit?html,output

jasongardnerlv avatar Jan 22 '16 21:01 jasongardnerlv

I have the same issue still in version 1.1.17. What is the status?

Pettor avatar Aug 09 '16 10:08 Pettor

Hello, the issue still open in 2018? Any idea is this going to be fixed?

edit: think this._focusableElement.focus(); will not select text and this._focusableElement.select(); needs to be called as well

TvrtkoM avatar Jul 18 '18 11:07 TvrtkoM