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

Issue 657850 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 676244

Blocking:
issue 462133



Sign in to add a comment

No control is focused by default in the cookies dialog when full keyboard access is off

Project Member Reported by sdy@chromium.org, Oct 20 2016

Issue description

Version: 56.0.2895.0
OS: 10.11, 10.12

What steps will reproduce the problem?
(1) Make sure full keyboard access is turned off.
(2) Open the cookies dialog from the OIB.

What is the expected output?
Some control has focus.

What do you see instead?
Nothing has focus until you hit tab.
 
Status: Available (was: Untriaged)

Comment 2 by tapted@chromium.org, Dec 12 2016

Blocking: 462133
Blockedon: 676244
Owner: patricia...@chromium.org
Status: Started (was: Available)
In progress CL: https://codereview.chromium.org/2604303002/
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d47709bf1d00beaa556804b25300ebdceecca07

commit 7d47709bf1d00beaa556804b25300ebdceecca07
Author: patricialor <patricialor@chromium.org>
Date: Mon Jan 16 01:53:28 2017

(Mac)Views: Widgets focus first View in traversal order if initial focus fails.

views::Widgets use SetInitialFocus(), which calls
WidgetDelegate::GetInitiallyFocusedView() to set focus to a View on first
opening the Widget. In cases where GetInitiallyFocusedView() returns an
unfocusable View, the call to RequestFocus() silently fails and the Widget is
opened without focus on anything.

In particular, this is happening on MacViews when full keyboard access is turned
off. Support for full keyboard access was implemented in r391744, but
DialogDelegate::GetInitiallyFocusedView() still returns the dialog's default
button regardless of full keyboard access. This results in the dialog opening
with nothing focused.

Fix this in general for all views::Widgets trying to focus an unfocusable View -
if the View returned by WidgetDelegate::GetInitiallyFocusedView() isn't able to
become focused and no other View has focus, manually advance focus on the focus
manager instead.

BUG= 657850 
TEST=On Mac with #secondary-ui-md flag enabled and full keyboard access turned
off (System Preferences > Keyboard > Shortcuts, make sure 'All controls' radio
button is not selected), open the collected cookies dialog by going to
google.com, clicking 'Secure' on the left of the omnibox, and clicking 'X in
use' under 'Cookies'. The TreeView should have focus.

Review-Url: https://codereview.chromium.org/2604303002
Cr-Commit-Position: refs/heads/master@{#443827}

[modify] https://crrev.com/7d47709bf1d00beaa556804b25300ebdceecca07/ui/views/widget/widget.cc
[modify] https://crrev.com/7d47709bf1d00beaa556804b25300ebdceecca07/ui/views/window/dialog_delegate_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment