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

Issue 633969 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Regression: Unnecessary focus move to 'Font size' list after closing 'Page zoom' list via Esc key in chrome://md-settings

Reported by jshan...@etouch.net, Aug 3 2016

Issue description

Chrome Version:53.0.2785.45 (Official Build) 70a7d200b65a4bc8fa957bfa8a8ad8bc8f429bdb-refs/branch-heads/2785@{#477} 32/64-bit.
OS: Windows (7,8,8.1,10), Linux(14.04 LTS) and Mac(10.10.5, 10.11.4)

Steps:
1. Launch Chrome and navigate to chrome://md-settings
2. Click on 'Font size' drop down list, press tab key and press space bar key when focus is on 'Page zoom' 
3. Now press Esc key and observe.

Actual: Unnecessary focus move to 'Font size' drop down list after closing 'Page zoom' list via Esc key.

Expected: Focus should not move to 'Font size' drop down list after closing 'Page zoom' list via Esc key.

This is a regression issue broken in M-53, below is bisect info.

Good build: 53.0.2769.0
Bad build: 53.0.2770.0

Narrow bisect:
https://chromium.googlesource.com/chromium/src/+log/2a1d902c9b711bddee9b8fab3c6643d2e24f8815..59650de52fb52324b91c67086e2d9afeac5d8114?pretty=fuller&n=100 

Suspecting: r400318 ?

Please help to re-assign if your change is not the cause for this issue.


 
Actual_video.mp4
299 KB View Download
Expected_video.mp4
236 KB View Download

Comment 1 by dbeam@chromium.org, Aug 3 2016

Cc: valdrin@google.com
looks like focus is being restored to the wrong <paper-dropdown>?

Comment 2 by dbeam@chromium.org, Aug 3 2016

Cc: dbeam@chromium.org
Owner: ----

Comment 3 by dbeam@chromium.org, Aug 3 2016

Status: Available (was: Assigned)

Comment 4 by valdrin@google.com, Aug 3 2016

Seems related to how `restoreFocusOnClose` works. This property default value is `true` in the latest `paper-menu-button` and `paper-dropdown-menu`, but you can change its value to false.

Note on the property itself: it is defined in `iron-overlay-behavior` and, as the name suggests, it will restore the focus when the overlay is closed (in this case `iron-dropdown` inside the `paper-menu-button` inside the `paper-dropdown-menu`). There is an issue [1] which requests to change its behavior to actually restore the focus on cancel (aka only when pressing esc keyboard)

[1] https://github.com/PolymerElements/iron-overlay-behavior/issues/210

Comment 5 by dbeam@chromium.org, Aug 3 2016

valdrin@: yep, get that, but it looks like closing the LOWER dropdown's menu restores focus to the UPPER dropdown.

Comment 6 by valdrin@google.com, Aug 3 2016

dbeam@: yep, what happens is that the click event causes:
1. the UPPER dropdown to close (click outside) & focus to be restored there
2. the LOWER dropdown to open and to register who's the focused node before it gets opened (which is the UPPER dropdown)

So on ESC key, the LOWER dropdown considers the UPPER dropdown to be the element where to restore focus ;_;

Focus should be restored only when pressing the ESC key. I've opened an issue in iron-dropdown https://github.com/PolymerElements/iron-dropdown/issues/99

Note: Above issue is fixed on latest canary version 55.0.2878.0 on Windows, Mac and Linux OS.
Labels: Proj-MaterialDesign-WebUI
Owner: dpa...@chromium.org
Status: Fixed (was: Available)
I believe this was fixed by https://codereview.chromium.org/2374253012.

Sign in to add a comment