-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
[Bug]: Dragging down bottom sheet when Text Input is selected causes to go away from screen #2107
Comments
A quick fix I'm doing is to snap the bottomsheet to 1 when it detects index being -1. This makes it appear at all times and never goes off-screen. Code:
|
We're dealing with a very similar issue to you; on keyboard blur in a similar screen it does the same behaviour -> fully closes the bottom sheet. I've done a little write-up of what I've found in the next comment. If I ignore any
the bug stops occurring. This is obviously not a proper fix, but it's as far as I've gone so far. Curious if that also stops the bug for you? If so we probably have a similar/same root cause. |
A bit more of a clear report what's happening. I'm writing this here since
If this is not relevant to current issue, please remove/hide my comment. Don't mean to pollute/distract. Steps what happens
This causes the following line to return
react-native-bottom-sheet/src/components/bottomSheet/BottomSheet.tsx Lines 1008 to 1013 in 7bfe7ae
|
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
Android
What happened?
When text input (BottomSheetTextInput) is selected and you drag down the bottom sheet it goes away from screen and not recoverable. BottomSheet Index is -1.
My lowest snap point is set at 25%.
Issue occurs on physical android device and android emulator.
The code is from the docs for BottomSheetTextInput and hasn't been changed:
URL to docs: https://gorhom.dev/react-native-bottom-sheet/components/bottomsheettextinput
video.mp4
Reproduction steps
Reproduction sample
https://snack.expo.dev/EiR7hPk0P3p44RA7QGcgc
Relevant log output
The text was updated successfully, but these errors were encountered: