Skip to content
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] bugs with prop enableDynamicSizing={true} #1859

Open
kawasakime opened this issue Jun 5, 2024 · 3 comments
Open

[v4] bugs with prop enableDynamicSizing={true} #1859

kawasakime opened this issue Jun 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@kawasakime
Copy link

kawasakime commented Jun 5, 2024

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 kawasakime added the bug Something isn't working label Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

@kawasakime: hello! 👋

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

@cfragkos
Copy link

I can confirm 3. Please look it up

@kawasakime
Copy link
Author

kawasakime commented Jun 18, 2024

+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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants