Skip to content

Commit 482c73d

Browse files
sherginfacebook-github-bot
authored andcommitted
More accurate touch bookkeeping in RCTTouchHandler
Reviewed By: javache Differential Revision: D4381374 fbshipit-source-id: d959381617eda93658d519e7a3c565093eb9fae8
1 parent 78118d5 commit 482c73d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

React/Base/RCTTouchHandler.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ - (void)_recordNewTouches:(NSSet<UITouch *> *)touches
9292

9393
NSNumber *reactTag = [targetView reactTagAtPoint:[touch locationInView:targetView]];
9494
if (!reactTag || !targetView.userInteractionEnabled) {
95-
return;
95+
continue;
9696
}
9797

9898
// Get new, unique touch identifier for the react touch
@@ -125,7 +125,7 @@ - (void)_recordRemovedTouches:(NSSet<UITouch *> *)touches
125125
{
126126
for (UITouch *touch in touches) {
127127
NSUInteger index = [_nativeTouches indexOfObject:touch];
128-
if(index == NSNotFound) {
128+
if (index == NSNotFound) {
129129
continue;
130130
}
131131

@@ -322,6 +322,10 @@ - (BOOL)canBePreventedByGestureRecognizer:(__unused UIGestureRecognizer *)preven
322322
- (void)reset
323323
{
324324
_dispatchedInitialTouches = NO;
325+
326+
[_nativeTouches removeAllObjects];
327+
[_reactTouches removeAllObjects];
328+
[_touchViews removeAllObjects];
325329
}
326330

327331
- (void)cancel

0 commit comments

Comments
 (0)