question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v4] Bottom sheet close method does nothing after sheet is interrupted while closing

See original GitHub issue

Bug

Hi, I have a problem with bottom sheet’s close method. When you try to close the bottom sheet with a button and then you interrupt it with your finger. It looks like it’s stuck in some state and close method does absolutely nothing after that. However I can still close the bottom sheet by swiping it down. Or fix “the state” by resizing it manually a bit but that’s not a solution for me as I want to close the bottom sheet with a button. Look at the provided video and snack example. I am using Expo SDK 42.

Environment info

Library Version
@gorhom/bottom-sheet 4.1.1
react-native 0.63.53
react-native-reanimated 2.2.2
react-native-gesture-handler 1.10.3

Steps To Reproduce

  1. Open the bottom sheet using the expand() method or use animateOnMount={true}
  2. Press the close button which calls close()
  3. Bottom sheet starts it’s closing animation
  4. While the bottom sheet closing animation is in progress, interrupt it with your finger and hold it in the position
  5. Lift your finger without swiping
  6. Press the close button again multiple times
  7. Nothing happens

Describe what you expected to happen:

  1. I expect the bottom sheet to close when the close button is pressed again after interrupting it.

Reproducible sample code

https://snack.expo.dev/fUYBOczk2

Video

https://user-images.githubusercontent.com/84575256/136959007-a4b794f0-7b64-4679-ae4b-1893dc5afa22.mp4

Logs

Maybe some logs will help you

[BottomSheet::handleClose] 
[BottomSheet::animateToPosition] velocity:0 position:725 currentPosition:525
[BottomSheet::handleOnAnimate] toIndex:-1 fromIndex:0
[BottomSheet::handleClose] 
[BottomSheet::handleClose] 
[BottomSheet::handleClose] 
[BottomSheet::handleClose] 

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
siddharth-ktcommented, Oct 30, 2021

this related #632 which i am working on a fix that hopefully will land this week 👍

Hi Gorhom, is it fixed ?

3reactions
gorhomcommented, Oct 18, 2021

this related #632 which i am working on a fix that hopefully will land this week 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jetpack Compose BottomSheetScaffold: Smooth closing
This generally works as intended, I can set showBottomSheet.value to false to hide the bottom sheet. However, the hiding looks janky, because ...
Read more >
Props | React Native Bottom Sheet - GitHub Pages
This will initially mount the sheet closed and when it's mounted and calculated the layout, it will snap to initial snap point index....
Read more >
Sheets: bottom - Material Design
Implementing bottom sheet theming. Setting the theme attribute bottomSheetDialogTheme to your custom ThemeOverlay will affect all bottom sheets. In res/values/ ...
Read more >
BottomSheetBehavior | Android Developers
boolean, getSkipCollapsed(). Sets whether this bottom sheet should skip the collapsed state when it is being hidden after it is expanded once.
Read more >
Popups: 10 Problematic Trends and Alternatives
Modal: the content on the page is disabled until the user explicitly ... that users will pay no attention to the popup or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found