Skip to content
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 #1746

Closed
pierroo opened this issue Feb 20, 2024 · 1 comment
Closed

[v4] bottomsheettextinput autofocus bugs #1746

pierroo opened this issue Feb 20, 2024 · 1 comment
Labels

Comments

@pierroo
Copy link

pierroo commented Feb 20, 2024

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:


<BottomSheetTextInput
value={newName}
onChangeText={setNewName}
isDisabled={isLoading}
autoFocus
...

Environment info

Library Version
@gorhom/bottom-sheet 4.6.0
react-native 0.73.4
react-native-reanimated 3.6.2
react-native-gesture-handler 2.15.0
@pierroo pierroo added the bug Something isn't working label Feb 20, 2024
Copy link

@pierroo: hello! 👋

This issue is being automatically closed because it does not follow the issue template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant