diff --git a/React/Base/RCTTouchHandler.m b/React/Base/RCTTouchHandler.m index 05fce0f3a..e9d2e20de 100644 --- a/React/Base/RCTTouchHandler.m +++ b/React/Base/RCTTouchHandler.m @@ -39,6 +39,7 @@ BOOL _dispatchedInitialTouches; BOOL _recordingInteractionTiming; CFTimeInterval _mostRecentEnqueueJS; + uint16_t _coalescingKey; } - (instancetype)initWithBridge:(RCTBridge *)bridge @@ -200,7 +201,7 @@ typedef NS_ENUM(NSInteger, RCTTouchEventType) { RCTTouchEvent *event = [[RCTTouchEvent alloc] initWithEventName:eventName reactTouches:reactTouches changedIndexes:changedIndexes - coalescingKey:0]; + coalescingKey:_coalescingKey]; [_eventDispatcher sendEvent:event]; } @@ -233,6 +234,7 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches) { // If gesture just recognized, send all touches to JS as if they just began. if (self.state == UIGestureRecognizerStateBegan) { + _coalescingKey++; [self _updateAndDispatchTouches:_nativeTouches.set eventName:@"topTouchStart" originatingTime:0]; // We store this flag separately from `state` because after a gesture is