-
-
Notifications
You must be signed in to change notification settings - Fork 771
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][v5] [Android] | TextInput at the bottom of a scroll view falls behind keyboard #1934
Comments
@atlj Try it with this library's BottomSheetTextInput instead of TextInput. I was also experiencing a similar issue with the virtual keyboard until I switched to BottomSheetTextInput. |
Hey @brentforder oh you're right. I actually had this issue with the library's text input too but looks like I used a regular text input on the sample code. I will update it, thanks! |
Okay, I just updated the Snack code, the issue still exists on Android. |
+1 on this issue. I have a |
+1... i spent hours debugging why my form UI started misbehaving and this is exactly the behavior, i am using bottom-sheet as well, the screen is within bottom sheet provider |
thanks @atlj for reporting this issue, the issue is a bit complex especially with how android deal with resizing the whole container but i managed to get it working Screen.Recording.2024-10-03.at.00.54.50.mp4im going to test out other use cases before i push the fix |
@gorhom is there a way to just make android not move the bottom sheet up at all? I think that's my issue. The keyboard moves up the entire bottom sheet over my text field. I just want my bottom sheet to stay exactly where it's at when the keyboard come up. Let's say my bottom sheet is at a 50% snap point and in the background screen I have a text input in the upper half. When I tap that text input, the keyboard pushes the entire bottom sheet over my text input on Android only. |
@ChristopherGabba The logic needs to anchor to a certain position after the keyboard appearance and in my fix, it will anchor to the text input. Wouldn't this address your use case ? |
Maybe so, once you push your fix, I'll try it and if it's still an issue, I'll make a repro and submit another issue! Thanks for the work on this, really appreciate it... |
@gorhom Good afternoon, I tried v5.0.1 and it still appears to be happening. Here is a demo in expo-snack (latest I could go was 5.0.0-alpha but it is still happening in 5.0.1 in my app): https://snack.expo.dev/@christophergabba/bottom-sheet---issue-reproduction-template I used a Google Pixel 5. This is a super simplified example, but this is happening in my production app on Android only. Steps to reproduce:
You'll see the bottom sheet shifts up some when the keyboard comes out, resulting in it slightly covering the TextInput. On |
Bug
I was able to reproduce this both with
4.6.4
and5-alpha.11
. When I have a scroll view and there is a text input at the bottom, the text input falls behind the keyboard on Android. I'm using theandroid_keyboardInputMode="adjustResize"
and my snap point here is100%
.Screen.Recording.2024-09-12.at.14.57.31.mov
Environment info
Steps To Reproduce
android_keyboardInputMode="adjustResize"
(also change this option in yourapp.json
/AndroidManifest.xml
toadjustResize
100%
Describe what you expected to happen:
What's happening instead:
Reproducible sample code
https://snack.expo.dev/@atlj0/bottom-sheet-v4-android-keyboard-hides-textinput
The text was updated successfully, but these errors were encountered: