-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Context
react-native-keyboard-controller's replaceStatusBarInsets() zeroes out the top system bar inset when statusBarTranslucent=true. With edgeToEdgeEnabled=true (Expo 54 default), KeyboardProvider forces statusBarTranslucent=true regardless of props, so the top inset is always zeroed before being dispatched to child views. This causes react-native-screens' CustomToolbar to receive top=0 and apply no status bar padding, making the header overlap the status bar on Android.
We applied a pnpm patch to react-native-keyboard-controller that always passes through the real sysBars.top. The content margin in setupWindowInsets() already handles the layout offset independently.
The patch was added in #2523.
Action
Once a fix is released upstream in react-native-keyboard-controller:
- Upgrade
react-native-keyboard-controllerinapps/mobile/package.jsonto the version containing the fix - Remove
patches/react-native-keyboard-controller@1.21.0.patch - Remove the
react-native-keyboard-controller@1.21.0entry frompatchedDependenciesin rootpackage.json - Run
pnpm installand verify on Android
References
- Upstream issue: KeyboardProvider overrides system insets on Android potentially affecting native views kirillzyusko/react-native-keyboard-controller#1013
- Related issue: The library interacts oddly with Android header height in @react-navigation/native-stack kirillzyusko/react-native-keyboard-controller#1292
- react-native-screens issue (symptom): No top insets for Android in 4.19.0 software-mansion/react-native-screens#3499
- Our PR: feat(mobile): iOS 26 header compatibility and header icon fixes #2523