react-native-pager-view icon indicating copy to clipboard operation
react-native-pager-view copied to clipboard

Android: Touchables trigger when swiping in the wrong horizontal direction on first/last slide

Open svenlombaert opened this issue 2 years ago • 3 comments

Environment

"react-native": "0.72.5",
"react-native-tab-view": "*",
"react-native-pager-view": "6.0.1",
"react-native-gesture-handler": "~2.8.0"

Description

I recently upgraded from a really old version of react-native-tab-view and can't seem to fix this one.

When swiping to the right on the first tab, or to the left on the last tab (so in the "wrong" direction) it triggers a tap inside my flatlist/scrollview touchables. Everything is fine when you swipe in the correct direction.

I would expect that a swipe over a touchable would not trigger a tap, even if it's in the wrong direction.

Reproducible Demo

I have made a reproduceable snack here: https://snack.expo.dev/@svrnlombaert/android-bug-react-native-tab-view?platform=android

Video:

https://github.com/callstack/react-native-pager-view/assets/2846986/f318c609-f5fe-4a6e-ac11-2f119390b0e5

svenlombaert avatar Oct 12 '23 08:10 svenlombaert

Please try using latest react-native-pager-view

MrRefactor avatar Nov 28 '24 07:11 MrRefactor

Please try using latest react-native-pager-view

It's still happening on 6.5.1

svenlombaert avatar Nov 28 '24 11:11 svenlombaert

@MrRefactor I've installed 6.7.0, and this is still happening. It's only when you swipe in the "wrong" direction on either the first or last slide. I'm using the TouchableOpacity and Flatlist from react-native-gesture-handler

svenlombaert avatar Mar 05 '25 15:03 svenlombaert