From 6c6713b0376a36feb38d7a5e9ee0457881372d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?avery=20=E2=9C=BF?= Date: Thu, 14 Mar 2024 19:46:39 -0700 Subject: [PATCH] partially resolve android keyboard bug https://github.com/gorhom/react-native-bottom-sheet/issues/618#issuecomment-1831200388 --- src/components/bottomSheet/BottomSheet.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/bottomSheet/BottomSheet.tsx b/src/components/bottomSheet/BottomSheet.tsx index 35d2bcf11..6bedc0367 100644 --- a/src/components/bottomSheet/BottomSheet.tsx +++ b/src/components/bottomSheet/BottomSheet.tsx @@ -1436,6 +1436,7 @@ const BottomSheetComponent = forwardRef( method: 'useAnimatedReaction::OnSnapPointChange', params: { snapPoints, + containerHeight, }, }); @@ -1479,7 +1480,11 @@ const BottomSheetComponent = forwardRef( useAnimatedReaction( () => ({ _keyboardState: animatedKeyboardState.value, - _keyboardHeight: animatedKeyboardHeight.value, + _keyboardHeight: + Platform.OS === 'android' && + android_keyboardInputMode === KEYBOARD_INPUT_MODE.adjustResize + ? 0 + : animatedKeyboardHeight.value, }), (result, _previousResult) => { const { _keyboardState, _keyboardHeight } = result;