[Android] `presentation="formSheet"` with `sheetAllowedDetents="fitToContents"`causes the screen to appear under the keyboard
Description
https://github.com/user-attachments/assets/8286044e-dc32-4bc9-a5e2-ae3023c5f3ce
Steps to reproduce
- Create a FormSheet with
sheetAllowedDetentsset tofitToContentsand an input inside - Focus the input
- Keyboard opens over the input
Snack or a link to a repository
https://github.com/plneple/react-native-screens/tree/d79b0ac5802c449db4947a4614df2f11f1fb5130
Screens version
4.6.0-beta.1 (89822867fc15d6e92e8b17d59b933bb040b9b39c)
React Native version
0.77
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
None
Device
Real device
Device model
No response
Acknowledgements
Yes
I confirm the issue is reproducible.
The issue persists in [email protected]
What helps is to set position to absolute value in a contentStyle of a formSheet screen.
Bug still present in 4.9.0
Also happening on Fabric and newest betas
Fixed by: https://github.com/software-mansion/react-native-screens/pull/3248
https://github.com/user-attachments/assets/02388ddb-6237-4fbd-ae67-05f37aa9b867