@@ -799,7 +799,13 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
799
799
*/
800
800
if (
801
801
keyboardBehavior === KEYBOARD_BEHAVIOR . interactive &&
802
- keyboardState === KEYBOARD_STATE . SHOWN
802
+ keyboardState === KEYBOARD_STATE . SHOWN &&
803
+ // ensure that this logic does not run on android
804
+ // with resize input mode
805
+ ! (
806
+ Platform . OS === 'android' &&
807
+ android_keyboardInputMode === 'adjustResize'
808
+ )
803
809
) {
804
810
isInTemporaryPosition . value = true ;
805
811
const keyboardHeightInContainer =
@@ -895,7 +901,10 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
895
901
* when evaluating the position while the bottom sheet is
896
902
* closing, then we force closing the bottom sheet with no animation.
897
903
*/
898
- if ( animatedNextPositionIndex . value === - 1 ) {
904
+ if (
905
+ animatedNextPositionIndex . value === - 1 &&
906
+ ! isInTemporaryPosition . value
907
+ ) {
899
908
setToPosition ( animatedClosedPosition . value ) ;
900
909
return ;
901
910
}
@@ -907,7 +916,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
907
916
*/
908
917
if ( animatedNextPositionIndex . value !== animatedCurrentIndex . value ) {
909
918
animateToPosition (
910
- animatedNextPosition . value ,
919
+ animatedSnapPoints . value [ animatedNextPositionIndex . value ] ,
911
920
source ,
912
921
undefined ,
913
922
animationConfigs
@@ -1565,6 +1574,20 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1565
1574
)
1566
1575
: Math . abs ( _keyboardHeight - animatedContainerOffset . value . bottom ) ;
1567
1576
1577
+ /**
1578
+ * if platform is android and the input mode is resize, then exit the method
1579
+ */
1580
+ if (
1581
+ Platform . OS === 'android' &&
1582
+ android_keyboardInputMode === KEYBOARD_INPUT_MODE . adjustResize
1583
+ ) {
1584
+ animatedKeyboardHeightInContainer . value = 0 ;
1585
+
1586
+ if ( keyboardBehavior === KEYBOARD_BEHAVIOR . interactive ) {
1587
+ return ;
1588
+ }
1589
+ }
1590
+
1568
1591
/**
1569
1592
* if user is interacting with sheet, then exit the method
1570
1593
*/
@@ -1587,18 +1610,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1587
1610
return ;
1588
1611
}
1589
1612
1590
- /**
1591
- * if platform is android and the input mode is resize, then exit the method
1592
- */
1593
- if (
1594
- Platform . OS === 'android' &&
1595
- keyboardBehavior === KEYBOARD_BEHAVIOR . interactive &&
1596
- android_keyboardInputMode === KEYBOARD_INPUT_MODE . adjustResize
1597
- ) {
1598
- animatedKeyboardHeightInContainer . value = 0 ;
1599
- return ;
1600
- }
1601
-
1602
1613
let animationConfigs = getKeyboardAnimationConfigs (
1603
1614
keyboardAnimationEasing . value ,
1604
1615
keyboardAnimationDuration . value
0 commit comments