Skip to content

Commit 2df866f

Browse files
author
Javier Ernesto Flores Robles
committed
[iOS][MF] Fix content instets on rotation
Bug: 845472 Change-Id: I3afc1e03c280c88cce039ac8d4a6b288edd7be78 Reviewed-on: https://chromium-review.googlesource.com/c/1355173 Reviewed-by: Yi Su <mrsuyi@chromium.org> Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#612608}(cherry picked from commit 39cf762) Reviewed-on: https://chromium-review.googlesource.com/c/1363176 Reviewed-by: Javier Ernesto Flores Robles <javierrobles@chromium.org> Cr-Commit-Position: refs/branch-heads/3626@{#72} Cr-Branched-From: d897fb1-refs/heads/master@{#612437}
1 parent 30600f9 commit 2df866f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ios/chrome/browser/ui/autofill/manual_fill/fallback_view_controller.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ - (void)handleKeyboardDidHide:(NSNotification*)notification {
104104
if (self.contentInsetsAlwaysEqualToSafeArea && !IsIPadIdiom()) {
105105
// Resets the table view content inssets to be equal to the safe area
106106
// insets.
107-
self.tableView.contentInset = self.view.safeAreaInsets;
107+
self.tableView.contentInset = UIEdgeInsetsZero;
108108
}
109109
}
110110

@@ -117,9 +117,9 @@ - (void)handleKeyboardWillShow:(NSNotification*)notification {
117117
[notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
118118
CGFloat keyboardHeight = keyboardFrame.size.height;
119119
UIEdgeInsets safeInsets = self.view.safeAreaInsets;
120+
// |contentInset| already contemplates the safe area.
120121
self.tableView.contentInset =
121-
UIEdgeInsetsMake(safeInsets.top, safeInsets.left,
122-
safeInsets.bottom - keyboardHeight, safeInsets.right);
122+
UIEdgeInsetsMake(0, 0, safeInsets.bottom - keyboardHeight, 0);
123123
}
124124
}
125125

0 commit comments

Comments
 (0)