From f4d57917176b409c7fd1cca71b8633f6c1ea0802 Mon Sep 17 00:00:00 2001 From: Tom King Date: Mon, 7 Mar 2016 17:15:30 -0500 Subject: [PATCH] in ASTextNode, bail from touchesMoved:withEvent: if the previousLocationInView is the same as the locationInView. On 3D Touch enabled phones, this gets fired with chages in force, and will usually get fired immediately after touchedBegan:withEvent, causing touches to usually be cancelled --- AsyncDisplayKit/ASTextNode.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 237c0434..d94a0f8b 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -891,6 +891,10 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; { [super touchesMoved:touches withEvent:event]; + // on 3D Touch enabled phones, this gets fired with changes in force, and usually will get fired immediately after touchesBegan:withEvent: + if (CGPointEqualToPoint([[touches anyObject] previousLocationInView:self.view], [[touches anyObject] locationInView:self.view])) + return; + // If touch has moved out of the current highlight range, clear the highlight. if (_highlightRange.length > 0) { NSRange range = NSMakeRange(0, 0);