Skip to content

Single tap not processed on time #3471

@adrianv-synergy

Description

@adrianv-synergy

Description

For a multi-gesture setup, the single-tap finalization is delayed until all touches are released.
It wouldn't be a problem unless we are talking about touches outside the tracked area, which should be otherwise ignored.

In its simplest setup, we can have a list with a ScrollView and a double & single tap combination.
Now when the scroll view has an active touch, any additional touches to the tracked area only process the double-tap gesture. Single-tap is only finalized once the initial touch over the list is released.
Even worse - when operating with one touch point only, single-tap finalization is delayed until the scroll`s momentum movement is completed.

I've tested 0.78 and 0.75.4 RN versions, both new & old architecture, with and without react-native-reanimated.
Tried to work it out by using RNGH ScrollView and simultaneous gestures, but it didn't make a difference.

Feels like it's a native iOS issue with gesture recognition. Works fine on Android under all scenarios.

Image
Image

Steps to reproduce

  1. Scroll the list outside a GestureDetector with enough momentum
  2. Single-tap within the GestureDetector area - onBegin will be called
  3. Observe that onEnd/onFinalize won't be called until scroll`s momentum completes

  1. Press and hold on a list outside a GestureDetector to initiate scrolling
  2. Single-tap (second touch-point) within the GestureDetector area - onBegin will be called
  3. Observe that onEnd/onFinalize won't be called until first touch over the scroll is released.

Expected outcome for both scenarios: - process gesture and call onEnd/onFinalize immediately after touch release within the gesture tracking area.

Snack or a link to a repository

https://snack.expo.dev/N82elUTphW1w7DR5Kp3K6

Gesture Handler version

2.18.1+

React Native version

0.75+

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions