diff --git a/React/Views/ScrollView/RCTScrollView.m b/React/Views/ScrollView/RCTScrollView.m index f0f64021aca6..f9819b47bc3a 100644 --- a/React/Views/ScrollView/RCTScrollView.m +++ b/React/Views/ScrollView/RCTScrollView.m @@ -331,6 +331,16 @@ - (void)_keyboardWillChangeFrame:(NSNotification *)notification newContentOffset.y -= contentDiff; } + if (@available(iOS 14.0, *)) { + // On iOS when Prefer Cross-Fade Transitions is enabled, the keyboard position + // & height is reported differently (0 instead of Y position value matching height of frame) + // Fixes similar issue we saw with https://github.com/facebook/react-native/pull/34503 + if (UIAccessibilityPrefersCrossFadeTransitions() && endFrame.size.height == 0) { + newContentOffset.y = 0; + newEdgeInsets.bottom = 0; + } + } + [UIView animateWithDuration:duration delay:0.0 options:animationOptionsWithCurve(curve)