-
-
Notifications
You must be signed in to change notification settings - Fork 867
Closed
Labels
Description
Bug
While in landscape orientation, BottomSheetContainer
is using the portrait window height to compute animatedContainerOffset.bottom
value. This bottom offset is then used to compute animatedKeyboardHeightInContainer
, which results in extra space between the keyboard and the bottom sheet content.
Example:
- bottom sheet content height = 375
- keyboard height = 209
- portrait window height = 812
- final keyboard offset: 209 - (812 - 375) = 228
These calculations are done in BottomSheetContainer
and BottomSheet
.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.4.3 |
react-native | 0.69.7 |
react-native-reanimated | 2.9.1 |
react-native-gesture-handler | 2.5.0 |
Steps To Reproduce
- Render a full height bottom sheet with a bottom sheet text input
- Switch to landscape orientation
- Focus on the input
Describe what you expected to happen:
- Bottom offset animates to the top of the keyboard (no space between the keyboard and bottom sheet content)
Reproducible sample code
Having a hard time getting this snack to run 🤔
https://snack.expo.dev/FcJeOyJNw