You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KeyboardAvoidingView stops working after rotation on iPad #47251
Using the KeyboardAvoidingView on iPad with latest React Native 0.76.0 does not work after device rotation. The keyboard will add the desired padding (or height) prior to rotation when the keyboard is visible. However, when the device is rotated, the KeyboardAvoidingView stops working. This seems to only happen on iPad. It was not an issue in prior React Native versions.
Steps to reproduce
Install the application on an iPad simulator with yarn ios
Select the text input and activate the software keyboard
Rotate the device
Note that the text input will no longer be visible and cannot be scrolled into view
Rotate the device back to the original orientation, text input still invisible
Text input will only become visible again after force quitting the app
React Native Version
0.76.0
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.7
CPU: (16) arm64 Apple M3 Max
Memory: 2.53 GB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.4
path: /opt/homebrew/Cellar/node@18/18.20.4_1/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.7.0
path: /opt/homebrew/Cellar/node@18/18.20.4_1/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.0-alpha.2
wanted: 15.0.0-alpha.2
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.0
wanted: 0.76.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
It seems that Dimensions does not get updated reliably in 0.76, which is the root cause for this bug. I will open a separate issue and reproducer for that bug.
Activity
cipolleschi commentedon Oct 28, 2024
Was it working properly in 0.75?
mhoran commentedon Oct 28, 2024
It does work properly in 0.75.
mhoran commentedon Oct 28, 2024
Reverting 3c54e1e resolves.
mhoran commentedon Oct 28, 2024
It seems that
Dimensionsdoes not get updated reliably in 0.76, which is the root cause for this bug. I will open a separate issue and reproducer for that bug.mhoran commentedon Oct 29, 2024
Confirmed this is fixed by e271b23 which is included in 0.76.1.