Permalink
Browse files

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
  • Loading branch information...
javache authored and facebook-github-bot-7 committed Dec 3, 2015
1 parent 5ad7dd3 commit 67bf0f1a70aa6efc667a6fe4499ae7c2212332ff
Showing with 1 addition and 1 deletion.
  1. +1 −1 React/Views/RCTScrollView.m
@@ -182,7 +182,7 @@ - (BOOL)_shouldDisableScrollInteraction
- (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

8 comments on commit 67bf0f1

@qingfeng

This comment has been minimized.

Show comment
Hide comment
@qingfeng

qingfeng Dec 14, 2015

Contributor

🍻

Contributor

qingfeng replied Dec 14, 2015

🍻

@hufeng

This comment has been minimized.

Show comment
Hide comment

love

@bakso

This comment has been minimized.

Show comment
Hide comment

love

@pranny

This comment has been minimized.

Show comment
Hide comment

<3

@bakso

This comment has been minimized.

Show comment
Hide comment

No use

@xwenliang

This comment has been minimized.

Show comment
Hide comment

no use..

@folivi

This comment has been minimized.

Show comment
Hide comment
@folivi

folivi Jan 31, 2016

issue persists

issue persists

@zhouhesheng

This comment has been minimized.

Show comment
Hide comment
@zhouhesheng

zhouhesheng Mar 10, 2016

warning again in react-native 0.21. 3 listviews in 1 scrollview

warning again in react-native 0.21. 3 listviews in 1 scrollview

Please sign in to comment.