From 67bf0f1a70aa6efc667a6fe4499ae7c2212332ff Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Thu, 3 Dec 2015 06:07:23 -0800 Subject: [PATCH] Avoid interrupting scrolling in nested scrollviews Summary: When we nest scrollviews, the hack in handleCustomPan: will cause the scroll to stall and break. There's still some weird behaviour inside ScrollResponder.js but this does not seem the affect the scrollview's scrolling. public Reviewed By: fionaf, jingc, majak Differential Revision: D2713639 fb-gh-sync-id: ad898ead62415bc14c91bc84fdfdb8c0fbb32b06 --- React/Views/RCTScrollView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Views/RCTScrollView.m b/React/Views/RCTScrollView.m index f1ef89572..5ae7fb05a 100644 --- a/React/Views/RCTScrollView.m +++ b/React/Views/RCTScrollView.m @@ -182,7 +182,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) - (void)handleCustomPan:(__unused UIPanGestureRecognizer *)sender { - if ([self _shouldDisableScrollInteraction]) { + if ([self _shouldDisableScrollInteraction] && ![[RCTUIManager JSResponder] isKindOfClass:[RCTScrollView class]]) { self.panGestureRecognizer.enabled = NO; self.panGestureRecognizer.enabled = YES; // TODO: If mid bounce, animate the scroll view to a non-bounced position