-
-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: cancelled events are not ended when manualActivation is used (#3273
) ## Description <!-- Description and motivation for this PR. Include 'Fixes #<number>' if this is fixing some issue. --> Fixes #3239 When the long press gesture is cancelled it is [forced](https://github.com/software-mansion/react-native-gesture-handler/blob/main/apple/Handlers/RNLongPressHandler.m#L111) to `reset`. However, base on [docs](https://developer.apple.com/documentation/uikit/uigesturerecognizer/reset()?changes=l_2&language=objc) `reset` is also called when the state changes to `failed`, `end` or `cancelled`, which means that it is called twice, leading to undefined order of state change events. ~~Base on [this](#3007) we can assume that~~ ~~it should only be forced to `reset` if `manualActivation` is enabled. The same applies to other gestures as well.~~ The issue here was the effect of not changing the state of `RNManualActivationRecognizer` [here](https://github.com/software-mansion/react-native-gesture-handler/blob/main/apple/RNManualActivationRecognizer.m#L69-L75) to `UIGestureRecognizerStateCancelled`. ## Test plan <!-- Describe how did you test this change here. --> Tested on repro from the above-mentioned issue and on repro from this [PR](#3007)
- Loading branch information
Showing
9 changed files
with
1 addition
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters