New issue
Advanced search Search tips

Issue 880533 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

mash: Control-F doesn't put focus in the find box

Project Member Reported by jamescook@chromium.org, Sep 4

Issue description

ToT linux-chromeos c600823b01b687f788b2cf2ade1d55c7d1c41772

--enable-features=SingleProcessMash

0. Launch chrome to NTP
1. Hit Ctrl-F
2. Focus moves to find bar
3. Close find bar
4. Navigate to xkcd.com
5. Hit Ctrl-F
6. Find bar opens, but focus doesn't move

Somehow the navigation is messing up focus.

There are similar problems with Ctrl-L to focus the omnibox.

 
Components: Internals>Services>Ash
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 5

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

commit 0579d8397d8b21434b16b739c9cfa7a572160af8
Author: James Cook <jamescook@chromium.org>
Date: Wed Sep 05 20:17:21 2018

chromeos: Fix find bar focus after Ctrl-F under mash

Pressing Ctrl-F creates a widget for DropdownBarHost and a textfield
for the text entry view. The view requests focus, which calls into
DesktopNativeWidgetAura::ClearNativeFocus() to return focus to the
active widget's contents aura::Window.

There's a special code path in FocusController for this case. However,
the existing window service code in //services/ws was always using
FocusController::FocusWindow() to maintain its version of focus.
That code path blocks focusing a parent when a child is focused, see
https://codereview.chromium.org/11519040

Instead, allow the window service to ResetFocusWithinActiveWindow()
in this case, similar to what the client is doing.

This fixes both Mash and SingleProcessMash. It also fixes a similar
issue with Ctrl-L and omnibox focus.

Bug:  880533 
Change-Id: Iaa3132d7e32b96bf2ad33f781f6696ec9c88218d
Reviewed-on: https://chromium-review.googlesource.com/1205498
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588984}
[modify] https://crrev.com/0579d8397d8b21434b16b739c9cfa7a572160af8/chrome/browser/ui/views/dropdown_bar_host.cc
[modify] https://crrev.com/0579d8397d8b21434b16b739c9cfa7a572160af8/services/ws/focus_handler.cc
[modify] https://crrev.com/0579d8397d8b21434b16b739c9cfa7a572160af8/services/ws/focus_handler_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment