Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] automaticallyAdjustKeyboardInsets not shifting scrollview content #46732

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing break statement
  • Loading branch information
zhongwuzw committed Sep 30, 2024
commit 60fb645815c9b09f526af4d870a27529bf386cbc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification
[(UIView *)currentFirstResponder isDescendantOfView:inputAccessoryView]) {
// Text input view is within the inputAccessoryView.
contentDiff = keyboardEndFrame.origin.y - keyboardBeginFrame.origin.y;
} else {
// Text input view is outside of the scroll view.
zhongwuzw marked this conversation as resolved.
Show resolved Hide resolved
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want an early return here? Or should we have a general check for contentDiff == 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to maintain the same logic as the old architecture, which does not perform early return checks or check for contentDiff == 0.

} else {
CGRect viewIntersection = CGRectIntersection(self.firstResponderFocus, keyboardEndFrame);
Expand Down
Loading