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
This commit is contained in:
Pieter De Baets
2015-12-03 06:07:23 -08:00
committed by facebook-github-bot-7
parent 5ad7dd3cac
commit 67bf0f1a70

View File

@@ -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