mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Cancel touches if surface touch handler can be prevented
Summary: Changelog: [internal] If `otherGestureRecognizer` prevents Fabric's gesture recogniser, we need to manually reset the inner state. This cancels any currently active touches. Reviewed By: shergin Differential Revision: D25664384 fbshipit-source-id: 9e3cd41351381bcfed2836dad3e80d5f021f936c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e3d8a6b222
commit
a3918f4102
@@ -410,4 +410,14 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithTarget : (id)target action : (SEL)act
|
||||
return [self canBePreventedByGestureRecognizer:otherGestureRecognizer];
|
||||
}
|
||||
|
||||
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
|
||||
shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
|
||||
{
|
||||
BOOL canBePrevented = [self canBePreventedByGestureRecognizer:otherGestureRecognizer];
|
||||
if (canBePrevented) {
|
||||
[self reset];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user