Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information