mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-01 08:45:09 +08:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user