You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix double start when activateAfterLongPress is used (#2628)
## Description
It seems like native iOS recognizers (or at least Pan) don't respect
when their state is changed from outside, which caused a problem with
`.activateAfterLongPress` - before sending event in `Active` state, the
state of the native recognizer is updated to
`UIGestureRecognizerStateBegan`. Despite this, after moving the finger
it tries to change the state to `UIGestureRecognizerStateBegan` once
more, causing weird `Active` -> `Began`, `Began` -> `Active` chain.
This PR adds a simple check to detect the first event and stop
processing in case it happens.
~~One thing that *could* be related is the fact that when the gesture
fails before activation, the gesture stays in the `Began` state until
the finger is lifted. This still needs to be investigated.~~ I think
this is a separate issue.
Fixes#2620
## Test plan
Tested on the example app.
---------
Co-authored-by: Michał Bert <63123542+m-bert@users.noreply.github.com>
0 commit comments