pavelbabenko / react-native-awesome-gallery

Performant, native-like, and well-customizable gallery for React Native.
MIT License
468 stars 51 forks source link

Tap gestures not working #41

Closed alexstanbury closed 2 years ago

alexstanbury commented 2 years ago

Hi, first of all, thanks for making the library, it's very handy.

I'm using 0.3.4, unfortunately tap and double tap gestures are not firing on either iOS or Android.

Example code:

 <Gallery
        disableTransitionOnScaledImage
        ref={galleryRef}
        data={images}
        onDoubleTap={() => {
          //doesn't work
          console.log('double tap');
        }}
        onTap={() => {
          //doesn't work
          console.log('tap');
        }}
         onScaleChange={() => {
          //works
          console.log('scale');
        }}
      />
pavelbabenko commented 2 years ago

@alexstanbury Which version of react-native-gesture-handler do you have?

alexstanbury commented 2 years ago

"react-native-gesture-handler": "^2.3.0"

On Sat, 26 Mar 2022, 16:36 pavelbabenko, @.***> wrote:

@alexstanbury https://github.com/alexstanbury Which version of gesture handler do you have?

— Reply to this email directly, view it on GitHub https://github.com/Flair-Dev/react-native-awesome-gallery/issues/41#issuecomment-1079728760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGFUQKAOSQPDDVOVAQOF2TVB44JPANCNFSM5RTVCGAA . You are receiving this because you were mentioned.Message ID: @.***>

alexstanbury commented 2 years ago

Just tested with a fresh react native project and still getting the same issue. It looks as though the pan start event is taking precedence over any tap events, as a guess you might need to add an activation threshold for the pan event activation.

pavelbabenko commented 2 years ago

Fixed in v0.3.5

alexstanbury commented 2 years ago

Thank you!