Skip to content
Commit 1a2700c3 authored by Aishwarya Rajesh's avatar Aishwarya Rajesh Committed by Chromium LUCI CQ
Browse files

[APS] Fix omnibox not gaining focus on the NTP when a hardware keyboard

is connected

Currently, the omnibox focus set by
LocationBarMediator#showUrlBarCursorWithoutFocusAnimations() is cleared
due to the unfocus logic in LocationBarMediator#setUrl() because of two
invocations of setUrl() that occur after the call to the former when the
NTP is opened - at the time of the first invocation the NTP URL is empty
and therefore the omnibox is unintentionally unfocused.

This CL attempts to remove the unfocus logic from setUrl() to overcome
this and control focus / unfocus for this use case from one point -
ToolbarManager#maybeShowCursorInLocationBar() will be repurposed to do
this.

Bug: 1445822
Change-Id: Ie83bc518f2513c45b416d8b1cf0ce7f9baec1ac7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4803169


Reviewed-by: default avatarPatrick Noland <pnoland@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: default avatarTheresa Sullivan <twellington@chromium.org>
Reviewed-by: default avatarTomasz Wiszkowski <ender@google.com>
Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
Cr-Commit-Position: refs/heads/main@{#1187927}
parent b3834898
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment