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

fix: reduce motion on iOS 14 breaks KeyboardAvoidingView #3

Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion Libraries/Components/Keyboard/KeyboardAvoidingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ class KeyboardAvoidingView extends React.Component<Props, State> {

_relativeKeyboardHeight(keyboardFrame: KeyboardEventCoordinates): number {
const frame = this._frame;
if (!frame || !keyboardFrame) {
// with iOS 14 & Reduce Motion > Prefer Cross-Fade Transitions enabled, the keyboard position
// & height is reported differently (0 instead of Y position value matching height of frame)
if (!frame || !keyboardFrame || keyboardFrame.screenY === 0) {
return 0;
}

Expand Down