Commit c7509abc authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Chromium LUCI CQ

[iOS][Getaway] Cancel omnibox edit when showing the blocking UI.

If the omnibox is editing when an incognito goes background, the blocker
should not allow for keyboard input.

Bug: 1160681
Change-Id: I55f4fa10a4ea97af01e4a96afe9d999d4a0d4cbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2600906
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839126}
parent dd029008
......@@ -4817,6 +4817,13 @@ NSString* const kBrowserViewControllerSnackbarCategory =
[self.view addSubview:self.blockingView];
AddSameConstraints(self.view, self.blockingView);
self.blockingView.alpha = 1;
[self.omniboxHandler cancelOmniboxEdit];
// Resign the first responder. This achieves multiple goals:
// 1. The keyboard is dismissed.
// 2. Hardware keyboard events (such as space to scroll) will be ignored.
UIResponder* firstResponder = GetFirstResponder();
[firstResponder resignFirstResponder];
} else {
[UIView animateWithDuration:0.2
animations:^{
......
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