react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v4] bugs with prop enableDynamicSizing={true}

Open kawasakime opened this issue 1 year ago • 5 comments

Bug

  1. If you set the enableDynamicSizing parameter to true, then the backdrop appears sharply, there is no smoothness, like snapPoints.
  2. if the parameter is set to true and if there is an input (BottomSheetTextInput) with autofocus inside the bottom sheet, then the panel does not open - the keyboard appears for a moment, then disappears, while the bottom sheet itself does not appear (only IOS)
  3. After it became impossible to work with enableDynamicSizing={true}, I set the value to false and set the size via snapPoints. I discovered a bug that if the panel is less than or equal to 310 pixels, then when you focus on the input, the bottom sheet immediately closes (only Android)

Environment info

Library Version
@gorhom/bottom-sheet 4.6.3
react-native 0.72.14
react-native-reanimated 3.11.0
react-native-gesture-handler 2.16.2

Steps To Reproduce

Reproducible sample code

  const renderBackdrop = useCallback((backdropProps) => (
    <BottomSheetBackdrop
      {...backdropProps}
      disappearsOnIndex={-1}
      appearsOnIndex={0}
    />
  ), []);
    <BottomSheet
      ref={bottomSheetRef}
      onClose={onClose}
      topInset={100}
      backgroundStyle={{ backgroundColor: isDark ? colors.backgroundDark : colors.backgroundLight }}
      handleIndicatorStyle={{ backgroundColor: isDark ? colors.backgroundLight : colors.backgroundDark }}
      enablePanDownToClose={true}
      backdropComponent={renderBackdrop}
      enableContentPanningGesture={true}
      enableDynamicSizing={!!props.enableDynamicSizing}
      snapPoints={props.enableDynamicSizing ? null : points}
      keyboardBehavior='interactive'
      keyboardBlurBehavior='restore'
      android_keyboardInputMode='adjustResize'
      {...props}
    >
      {children}
    </BottomSheet>

kawasakime avatar Jun 05 '24 14:06 kawasakime

@kawasakime: hello! :wave:

This issue is being automatically closed because it does not follow the issue template.

github-actions[bot] avatar Jun 05 '24 14:06 github-actions[bot]

I can confirm 3. Please look it up

cfragkos avatar Jun 18 '24 07:06 cfragkos

+1 bug found, if the bottom sheet is open, next then open the modal component and after closing the modal component right away closing the bottom sheet (using method .close() or .forceClose() no difference), and as a result with a high probability bottom sheet will not close (there will be a closing animation, but will immediately open again)

kawasakime avatar Jun 18 '24 08:06 kawasakime

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 05 '24 09:08 github-actions[bot]

I confirm that number 2 is not exclusive to iOS; I am experiencing the same behavior on Android.

bleszerd avatar Aug 08 '24 16:08 bleszerd

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Sep 09 '24 09:09 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 15 '24 09:09 github-actions[bot]

I am still facing the issue

Simranjit1080 avatar Nov 15 '24 08:11 Simranjit1080

+1

AlexanderBich avatar Dec 04 '24 16:12 AlexanderBich