glepur / react-native-swipe-gestures

4-directional swipe gestures for react-native
MIT License
607 stars 162 forks source link

ScrollView is stuck when you scroll vertically on iOS, (This is a solution) #78

Open johnslobodan07 opened 2 years ago

johnslobodan07 commented 2 years ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-swipe-gestures/index.js b/node_modules/react-native-swipe-gestures/index.js
index 38d1db5..fd94b51 100644
--- a/node_modules/react-native-swipe-gestures/index.js
+++ b/node_modules/react-native-swipe-gestures/index.js
@@ -58,8 +58,8 @@ class GestureRecognizer extends Component {

   _gestureIsClick(gestureState) {
     return (
-      Math.abs(gestureState.dx) < swipeConfig.gestureIsClickThreshold &&
-      Math.abs(gestureState.dy) < swipeConfig.gestureIsClickThreshold
+      Math.abs(gestureState.dx) < swipeConfig.gestureIsClickThreshold 
+      //&& Math.abs(gestureState.dy) < swipeConfig.gestureIsClickThreshold
     );
   }

This issue body was partially generated by patch-package.

NoatToan commented 1 year ago

I found that the solution causes bad behavior on vertical scrolling.