Commit 14e7ac0
Fix double start when
## 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>activateAfterLongPress is used (#2628)1 parent 7581fde commit 14e7ac0
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
243 | 252 | | |
244 | 253 | | |
245 | 254 | | |
| |||
0 commit comments