diff --git a/submodules/AsyncDisplayKit/Source/ASScrollNode.h b/submodules/AsyncDisplayKit/Source/ASScrollNode.h index 1137e89ede..35f6622f1a 100644 --- a/submodules/AsyncDisplayKit/Source/ASScrollNode.h +++ b/submodules/AsyncDisplayKit/Source/ASScrollNode.h @@ -45,6 +45,8 @@ NS_ASSUME_NONNULL_BEGIN */ @property ASScrollDirection scrollableDirections; +@property BOOL canCancelAllTouchesInViews; + @end NS_ASSUME_NONNULL_END diff --git a/submodules/AsyncDisplayKit/Source/ASScrollNode.mm b/submodules/AsyncDisplayKit/Source/ASScrollNode.mm index c6e60e619c..4dc0652820 100644 --- a/submodules/AsyncDisplayKit/Source/ASScrollNode.mm +++ b/submodules/AsyncDisplayKit/Source/ASScrollNode.mm @@ -33,6 +33,13 @@ return (ASScrollNode *)ASViewToDisplayNode(self); } +- (BOOL)touchesShouldCancelInContentView:(UIView *)view { + if ([[self scrollNode] canCancelAllTouchesInViews]) { + return true; + } + return [super touchesShouldCancelInContentView:view]; +} + #pragma mark - _ASDisplayView behavior substitutions // Need these to drive interfaceState so we know when we are visible, if not nested in another range-managing element. // Because our superclass is a true UIKit class, we cannot also subclass _ASDisplayView.