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
On Android, closing a plain React Native Modal can briefly show and immediately hide the software keyboard, even when:
the modal does not contain any TextInput
no TextInput was focused before opening the modal
the app only uses React Native core components
This creates a visible keyboard flicker during modal dismissal.
The repro app also listens to keyboardDidShow and keyboardDidHide and prints recent keyboard events on screen, so the behavior can be confirmed even if the visual flicker is very fast.
Steps to reproduce
Clone the repro:
git clone https://github.com/eduardoborges/rn-modal-keyboard-flicker-repro.git
cd rn-modal-keyboard-flicker-repro
Install dependencies:
npm install
Start Metro:
npm start
Run the Android app:
npm run android
Tap Open plain RN Modal.
Close the modal by tapping Close modal or the backdrop.
React Native Version
0.85.3
Affected Platforms
Runtime - Android
Areas
Modal, Keyboard, Android
Output of npx react-native info
System:
OS: Linux 7.0 Arch Linux
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 8.75 GB / 31.25 GB
Shell:
version: "5.9"
path: /usr/bin/zsh
Binaries:
Node:
version: 25.9.0
path: /home/edu/.local/share/mise/installs/node/latest/bin/node
Yarn: Not Found
npm:
version: 11.12.1
path: /home/edu/.local/share/mise/installs/node/latest/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: AI-253.32098.37.2534.15336583
Languages:
Java:
version: 17.0.18
path: /home/edu/.local/share/mise/installs/java/temurin-17/bin/javac
Ruby:
version: 3.4.1
path: /home/edu/.local/share/mise/installs/ruby/3.4.1/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.1.0
wanted: 20.1.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.85.3
wanted: 0.85.3
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
Device
Reproduced on a physical Android device:
Samsung SM-S938B
Android 16
The app was also installed on an Android emulator for comparison.
Closing a plain Modal should not show the software keyboard when there is no focused input and no TextInput inside the modal.
Actual behavior
The keyboard briefly appears and disappears while the modal is closing.
Notes
The repro uses a default React Native CLI project with android:windowSoftInputMode="adjustResize" in AndroidManifest.xml, which is the generated default.
The issue was originally noticed in a larger app using a custom bottom sheet component, but the standalone repro shows that the behavior is reproducible with a plain React Native Modal only.
Description
On Android, closing a plain React Native
Modalcan briefly show and immediately hide the software keyboard, even when:TextInputTextInputwas focused before opening the modalThis creates a visible keyboard flicker during modal dismissal.
The repro app also listens to
keyboardDidShowandkeyboardDidHideand prints recent keyboard events on screen, so the behavior can be confirmed even if the visual flicker is very fast.Steps to reproduce
Clone the repro:
git clone https://github.com/eduardoborges/rn-modal-keyboard-flicker-repro.git cd rn-modal-keyboard-flicker-reproInstall dependencies:
Start Metro:
Run the Android app:
Tap
Open plain RN Modal.Close the modal by tapping
Close modalor the backdrop.React Native Version
0.85.3
Affected Platforms
Runtime - Android
Areas
Modal, Keyboard, Android
Output of
npx react-native infoDevice
Reproduced on a physical Android device:
The app was also installed on an Android emulator for comparison.
Reproducer
https://github.com/eduardoborges/rn-modal-keyboard-flicker-repro
Expected behavior
Closing a plain
Modalshould not show the software keyboard when there is no focused input and noTextInputinside the modal.Actual behavior
The keyboard briefly appears and disappears while the modal is closing.
Notes
The repro uses a default React Native CLI project with
android:windowSoftInputMode="adjustResize"inAndroidManifest.xml, which is the generated default.The issue was originally noticed in a larger app using a custom bottom sheet component, but the standalone repro shows that the behavior is reproducible with a plain React Native
Modalonly.Demo
Screen_Recording_20260509_111457_RnModalKeyboardRepro.mp4