0
Files
src/ios
Quentin Pubert 3544a86caa [iOS] Fix Find UI resigning first responder when tab grid closes on iPad
When Native Find in Page (with the iOS 16 Find panel) is triggered on
iPhone, the Find navigator view becomes first responder in a separate
window i.e. not the key window. On iPad however, the Find navigator view
is not present in the current window scene and does not seem accessible
so there is no way to check if it should act as the first responder.
This is a problem because when the tab switcher is dismissed, the tab
grid coordinator will only look for a first responder in the current
window scene.

This CL changes how the tab grid coordinator decides on a new first
responder once it is done dismissing the tab switcher and presenting a
tab view controller on top of it. Specifically, instead of simply
setting the current BVC as first responder if no first responder has
been found in the current window scene, the tab grid coordinator also
checks if the current web state (the one being presented) has an active
Find UI and if Find in Page uses the system Find panel. If so, then the
Find navigator should already be presented at this point and so it
should remain first responder.

As a result, if the Find UI is active in the current web state, instead
of ignoring it and setting the BVC as first responder, the Find panel
will now remain first responder.

Fixed: 1442502
Change-Id: Ifd581709fe63a40df68abc847dfd441ef7bc106c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4526023
Commit-Queue: Quentin Pubert <qpubert@google.com>
Reviewed-by: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1144573}
2023-05-16 08:08:24 +00:00
..
2023-04-26 11:54:47 +00:00

This directory holds code related to Chrome for iOS. See this document for a description of the structure underneath this directory.