Skip to content

Commit

Permalink
Avoid interrupting scrolling in nested scrollviews
Browse files Browse the repository at this point in the history
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 67bf0f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Views/RCTScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

8 comments on commit 67bf0f1

@qingfeng
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@hufeng
Copy link

@hufeng hufeng commented on 67bf0f1 Dec 25, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love

@bakso
Copy link

@bakso bakso commented on 67bf0f1 Dec 31, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love

@pranny
Copy link

@pranny pranny commented on 67bf0f1 Jan 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@bakso
Copy link

@bakso bakso commented on 67bf0f1 Jan 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No use

@xwenliang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no use..

@folivi
Copy link

@folivi folivi commented on 67bf0f1 Jan 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue persists

@zhouhesheng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.