KeyboardAvoidingView
shows the keyboard avoiding area even if the keyboard is closed
#46942
Labels
API: Keyboard
Component: KeyboardAvoidingView
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
In the new architecture, if you open the soft keyboard, unmount
KeyboardAvoidingView
, close the keyboard, and then remountKeyboardAvoidingView
, it still assumes the keyboard is open and displays the keyboard avoiding area.This issue may happen during navigation because the
KeyboardAvoidingView
can be unmounted when you navigate away and remounted when you navigate back.Steps to reproduce
Build the reproducer with New Arch enabled and run it on iOS.
Click Show Keyboard, and ensure the soft keyboard is visible. If not, enable it in the simulator menu: I/O -> Keyboard -> Toggle Software Keyboard.
Click Freeze, Hide Keyboard, Unfreeze buttons in sequence.
Expected result: No blank area under the grey section.
Actual result: A blank area appears under the grey section.
React Native Version
0.75.4
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/QichenZhu/reproducer-react-native-keyboard-avoiding-view.git
Screenshots and Videos
373094107-d6765f8b-e297-4fef-ad4d-c443843663e2.mp4
The text was updated successfully, but these errors were encountered: