New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 856288 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Remove focus cruft in cr-input after Polymer 2 migration.

Project Member Reported by scottchen@chromium.org, Jun 25 2018

Issue description

A lot of patch-on code is added in cr-input to support non "0 or -1" tabindex. due to the fact that we need to move the focus from <input> to its containing <cr-input> right when someone presses shift-tab, we cannot override the focus() function for cr-input. This creates a couple problems, one of which is that we cannot call cr-input.focus twice in a row[1].

We tested in jsfiddle that with Polymer2, we don't have to move the focus to cr-input anymore, we can simply temporarily set cr-input's tabindex to -1 so that it temporarily becomes unfocusable. This means we can have a cr-input.focus() function again.

https://bugs.chromium.org/p/chromium/issues/detail?id=856118

We should also investigate if we need tabindex on cr-input at all anymore, or whether or not we can just depend on the native <input> within the shadow-dom to know how to deal with non-0-or-1 tabindex..

 

Sign in to add a comment