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

[v4] | [v2] Bottom Sheet can not be closed on SDK 45

Open PopAna1997 opened this issue 4 years ago • 14 comments

Bug

I have installed the latest SDK version, which is SDK 45. On IOS everything works fine, on Android there is a bug. After user opens the bottom sheet, there is no way to close it. There is no error or warning in the console. Before upgrading to SDK 45 everything worked fine.

Environment info

Library Version
@gorhom/bottom-sheet ^4.2.2
react-native 0.68.1
react-native-reanimated ~2.8.0
react-native-gesture-handler ^2.2.0

Steps To Reproduce

1.I have installed the latest SDK version, which is SDK 45. 2.On IOS everything works fine, on Android there is a bug. 3.On Android, after user opens the bottom sheet, there is no way to close it. 4.There is no error or warning in the console. Before upgrading to SDK 45 everything worked fine.

Describe what you expected to happen:

1.User should be able to close the bottom sheet on every OS

Reproducible sample code

PopAna1997 avatar May 06 '22 16:05 PopAna1997

Same issue is happening to me on Android Expo SDK 44

alkhatera avatar May 06 '22 17:05 alkhatera

I can't confirm this. I can close ModalBottomSheet and normal BottomSheets, with panning, background tap, dismiss and ref functions.

hirbod avatar May 09 '22 09:05 hirbod

Hi, I'm having same issue just on Android SDK 45. Any solution?

brelats avatar May 11 '22 11:05 brelats

I don't think there is an issue in the lib. I encountered the same issue on one project and react-native-gesture-handler was not correctly installed : see https://docs.swmansion.com/react-native-gesture-handler/docs/installation

After adding GestureHandlerRootView, everything works as expected on android

mlecoq avatar May 13 '22 13:05 mlecoq

I don't think there is an issue in the lib. I encountered the same issue on one project and react-native-gesture-handler was not correctly installed : see https://docs.swmansion.com/react-native-gesture-handler/docs/installation

After adding GestureHandlerRootView, everything works as expected on android

Exactly! This was the missing line that stopped it from closing responding to closing gestures. Thank you @mlecoq and everyone else 😁

alkhatera avatar May 14 '22 10:05 alkhatera

Lol so the answer is RTFM? Sorry to waste y'alls time... Thanks @mlecoq 💥

GentryRiggen avatar May 17 '22 06:05 GentryRiggen

I think I'll provide a PR to the docs to clear this one out. Still a lot of people that did not migrate to GestureHandlerRootView after upgrading RNGH.

hirbod avatar May 17 '22 06:05 hirbod

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 Jun 16 '22 09:06 github-actions[bot]

I don't think there is an issue in the lib. I encountered the same issue on one project and react-native-gesture-handler was not correctly installed : see https://docs.swmansion.com/react-native-gesture-handler/docs/installation

After adding GestureHandlerRootView, everything works as expected on android

This worked for me. Thank you! I have wrapped my application like this: <GestureHandlerRootView style={{ flex: 1 }}> ...

PopAna1997 avatar Jun 17 '22 07:06 PopAna1997

It fixed it for me too :) Would be good to add this to the documentation.

j3sch avatar Jul 05 '22 21:07 j3sch

It's in the documentation

hirbod avatar Jul 05 '22 22:07 hirbod

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 '22 09:08 github-actions[bot]

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

github-actions[bot] avatar Aug 10 '22 09:08 github-actions[bot]

This is a lifesaver. The biggest head-scratcher for Android, because it worked flawlessly without this on iOS. I'm commenting simply so I have a history of this if I ever run into this in the future 😂

princefishthrower avatar Sep 20 '22 18:09 princefishthrower