Choose Tryjobs button should focus regex filter textbox |
||||
Issue descriptionAffected Version: 2.15-rc2-2157-g1438975847 What steps will reproduce the problem? 1. Go to a CL 2. Click "Choose Tryjobs" button Expected: The "Regex filter" textbox in the "Choose tryjobs" window is focused Actual: No form element has keyboard focus. <Tab> focuses the textbox.
,
Jan 29 2018
,
Jan 31 2018
Here's a basic CL: https://chromium-review.googlesource.com/c/infra/gerrit-plugins/buildbucket/+/894845 This partially helps. The input will be focused the first time you open the dialog after a pageload. However, it doesn't become focused again if you close and reopen the dialog. The iron-overlay-behavior even has explicit support for that (https://github.com/PolymerElements/iron-overlay-behavior/blob/master/iron-overlay-behavior.html#L163) but something is going wrong. If a simple solution becomes obvious, I'll do that, but otherwise we might have to file a bug upstream and leave this as-is.
,
Jan 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/+/8b6bbfc8104e5015735e36c577b072bdfbb7326d commit 8b6bbfc8104e5015735e36c577b072bdfbb7326d Author: Aaron Gable <agable@chromium.org> Date: Wed Jan 31 00:44:20 2018 Autofocus filter input when opening overlay This is only a partial solution: although the input element will be focused the first time the overlay is opened, it doesn't become focused on future openings. This is despite the fact that iron-overlay-behavior (which the parent element, gr-overlay, imports) explicitly has support for focusing any [autofocus] elements. It's not clear why that isn't working as expected. R=seanmccullough Bug: 806971 Change-Id: I572b4a491a8de7cd46b0a583417c6d43c4a2373a Reviewed-on: https://chromium-review.googlesource.com/894845 Reviewed-by: Sean McCullough <seanmccullough@chromium.org> [modify] https://crrev.com/8b6bbfc8104e5015735e36c577b072bdfbb7326d/src/main/resources/static/cr-tryjob-picker.html
,
Jan 31 2018
A more comprehensive solution is here: https://chromium-review.googlesource.com/c/infra/gerrit-plugins/buildbucket/+/895845
,
Jan 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/+/0f63153fbfe0035f99e54c270f8fc109f4585b32 commit 0f63153fbfe0035f99e54c270f8fc109f4585b32 Author: Aaron Gable <agable@chromium.org> Date: Wed Jan 31 23:36:54 2018 Better and forward-compatible autofocus Even though iron-input-behavior (which gr-overlay imports) tries to focus elements with the 'autofocus' attribute, it only does so for element in the light dom. Because the filter input element is part of cr-tryjob-picker's shadow dom, it doesn't get focused by iron-input-behavior. The solution is to have iron-input-behavior focus the only element it can (the top-level cr-tryjob-picker itself), and then have that focus trigger an on-focus handler, which then sets focus to the place we want it. This cannot be done in _handleChooseTryJobsOpen because doing so results in a race between iron-input-behavior and us trying to set focus. Bug: 806971 Change-Id: Id95e30b1517ddb7d6145e9a6498f8a4b68a54d15 Reviewed-on: https://chromium-review.googlesource.com/895845 Reviewed-by: Sean McCullough <seanmccullough@chromium.org> [modify] https://crrev.com/0f63153fbfe0035f99e54c270f8fc109f4585b32/src/main/resources/static/cr-buildbucket-view.html [modify] https://crrev.com/0f63153fbfe0035f99e54c270f8fc109f4585b32/src/main/resources/static/cr-buildbucket-view.js
,
Jan 31 2018
The fix has been landed, but not imported and deployed. Going to mark this fixed; can Verify when deployment rolls out. |
||||
►
Sign in to add a comment |
||||
Comment 1 by logan@google.com
, Jan 29 2018