Dismiss the keyboard when dragging Tab Grid search results
This CL dismisses the keyboard as soon as the scrollview with the search results is scrolled. Prior to the new Compositional Layout, this was not an issue, as there was a bug where the Suggested Actions had a way too large height, leading to the Suggested Actions not being able to be occluded by the keyboard. But the Compositional Layout gives it its correct height, leaving it hidden behind the keyboard. An alternative fix would be to subscribe to the keyboard notifications, and adapt the scroll view's additional safe area insets but it's more cumbersome. Fixed: 1515895 Change-Id: I411b5bb0deb9fa62e4e43805a2eb5d2601da891e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5172556 Reviewed-by: Aliona Dangla <alionadangla@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Auto-Submit: Louis Romero <lpromero@google.com> Commit-Queue: Aliona Dangla <alionadangla@chromium.org> Cr-Commit-Position: refs/heads/main@{#1243454}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
77008a9b1c
commit
38cde2c628
@ -244,6 +244,7 @@ NSString* GroupGridCellAccessibilityIdentifier(NSUInteger index) {
|
||||
// collectionView contentInset manually to fit in the safe area instead.
|
||||
collectionView.contentInsetAdjustmentBehavior =
|
||||
UIScrollViewContentInsetAdjustmentNever;
|
||||
collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
|
||||
self.collectionView = collectionView;
|
||||
self.view = collectionView;
|
||||
|
||||
|
Reference in New Issue
Block a user