-
-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] bottomsheettextinput autofocus bugs #1747
Comments
same problem with BottomSheetModal |
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-02-24.at.19.22.26.mp4I am facing the textinput would move in slightly. |
Same problem |
same |
1 similar comment
same |
any updates? |
Hmm, the autofocus works, but it immediately shows the bottom sheet. 2024-04-24.20.39.33.mov |
I have the same problem, as soon as I try to focus it, whether it's through a ref.current.focus() in the useEffect or with the autofocus prop, it automatically closes the bottom sheet. The only way I found to allow it to work is to set a delay on the focus. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Bug
When using a BottomSheetTextInput inside a bottomsheet (not a modal), it has many issue in latest version on RN0.73+
=> if using autofocus, it will "blink" open the sheet / display keyboard / and close itself right away (randomly, 8 times out of 10)
=> when it "works" and open, it won't respect the sheet height (snapPoint) I wanted, 9 times out of 10 and will just open full height
In the first attached video, we can see the second case, first time autofocus open the sheet at its expected height, second it opens it full screen height without caring about my snapPoint
bottomsheetinput_issue.webm
On the other hand, if I remove the autofocus: snapPoints is initially respected, but as soon as I tap the input then the keyboard expanding will blink and close the sheet right away (second video)
bfdee7c0-73bd-4c14-9c8a-87c014295e2c.mp4
My code is very basic:
Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
https://snack.expo.io/@gorhom/bottom-sheet-v4-reproducible-issue-template
The text was updated successfully, but these errors were encountered: