react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

[Android] `presentation="formSheet"` with `sheetAllowedDetents="fitToContents"`causes the screen to appear under the keyboard

Open plneple opened this issue 11 months ago • 4 comments

Description

https://github.com/user-attachments/assets/8286044e-dc32-4bc9-a5e2-ae3023c5f3ce

Steps to reproduce

  1. Create a FormSheet with sheetAllowedDetents set to fitToContents and an input inside
  2. Focus the input
  3. 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

plneple avatar Jan 31 '25 08:01 plneple

I confirm the issue is reproducible.

kkafar avatar Jan 31 '25 10:01 kkafar

The issue persists in [email protected]

What helps is to set position to absolute value in a contentStyle of a formSheet screen.

RohovDmytro avatar Feb 10 '25 14:02 RohovDmytro

Bug still present in 4.9.0

marcosrdz avatar Feb 24 '25 01:02 marcosrdz

Also happening on Fabric and newest betas

hirbod avatar Mar 12 '25 12:03 hirbod

Fixed by: https://github.com/software-mansion/react-native-screens/pull/3248

https://github.com/user-attachments/assets/02388ddb-6237-4fbd-ae67-05f37aa9b867

t0maboro avatar Nov 13 '25 11:11 t0maboro