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

Not responding to touch inside BottomSheet @gorhom/bottom-sheet #5

Open
serhiihiba opened this issue Aug 21, 2024 · 5 comments
Open

Comments

@serhiihiba
Copy link

The component works fine on iOS, but on Android (both in the simulator and on real devices), it does not respond to touch when trying to scroll. I am using Expo, and this is a common issue when using import { ScrollView } from "react-native";. Therefore, we are using import { ScrollView } from "react-native-gesture-handler"; instead.

However, I am unsure how to apply this fix to the current library. I attempted to fork the library and replace ScrollView imports with react-native-gesture-handler, but this did not resolve the issue.

For context, I am using your component inside a BottomSheet from @gorhom/bottom-sheet (import BottomSheetModal, { BottomSheetBackdrop } from "@gorhom/bottom-sheet";).

@rozhkovs
Copy link
Member

rozhkovs commented Aug 21, 2024

Can you please send a link to the general problem? I assume that the ScrollView from "react-native" conflicts when there are gesture handlers from "react-native-gesture-handler" on top

Does the ScrollView from the "react-native-gesture-handler" work inside the BottomSheet?

I'm not sure if it's enough to just replace the ScrollView from the "react-native-gesture-handler". You may need to redo the animations to "react-native-reanimated"

In a good way, "react-native-reanimated" and "react-native-gesture-handler" have become a kind of standard and the library probably needs to be redone for this.

shoma-mano added a commit to shoma-mano/react-native-wheel-picker that referenced this issue Sep 1, 2024
shoma-mano added a commit to shoma-mano/react-native-wheel-picker that referenced this issue Sep 1, 2024
@shoma-mano
Copy link

I face the same issue when using this with @gorhom/bottom-sheet.

I solved this problem in my folk.

@serhiijun
For a temporary workaround, you can use this. I confirmed this worked in my project.

As @rozhkovs said, I migrated to react-native-reanimated from react-native, and added feature to replace ScrollView
because migrating was not enough to work with @gorhom/bottom-sheet.

Just in case, I will create PR. I hope this helps!

@rozhkovs
Copy link
Member

rozhkovs commented Sep 8, 2024

I assume that the problem arises precisely when used inside the BottomSheet. Here I described the nearest plan for completion

@rozhkovs rozhkovs changed the title Not responding to touch on Android Not responding to touch inside BottomSheet @gorhom/bottom-sheet Sep 18, 2024
@MrKarimi9425
Copy link

<BottomSheetModal
enableContentPanningGesture={false} // use this prop
...

@hodayaGruzm
Copy link

hey everybody, did anyone find solution for that problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants