Commit 9327148c authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Show cancel button when the omnibox is focused

This CL shows the cancel button when the omnibox is focused on portrait.
The omnibox can be focused and not the first responder when the user
taps the omnibox, display some suggestions, scroll the suggestions.
The correct check to know if the omnibox is focused is if it is showing
the popup or if it is first responder.

Bug: 836814
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I2d021154f033c81ddde731163c813eb850a973bd
Reviewed-on: https://chromium-review.googlesource.com/1064113Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559536}
parent 54fe8571
......@@ -129,7 +129,8 @@
- (void)viewControllerTraitCollectionDidChange:
(UITraitCollection*)previousTraitCollection {
BOOL omniboxFocused = self.isOmniboxFirstResponder;
BOOL omniboxFocused = self.isOmniboxFirstResponder ||
[self.locationBarCoordinator showingOmniboxPopup];
[self.orchestrator
transitionToStateOmniboxFocused:omniboxFocused
toolbarExpanded:omniboxFocused &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment