Call super if shouldDisableScrollInteraction false (#23647)

Summary:
Allow iOS to handle `touchesShouldCancelInContentView` on RCTScrollView if we aren't disabling the scroll interaction.

[iOS] [Changed] - RCTScrollView allows iOS to handle touchesShouldCancelInContentView
Pull Request resolved: https://github.com/facebook/react-native/pull/23647

Differential Revision: D14214248

Pulled By: hramos

fbshipit-source-id: 6e1bab3085aed6cabb93fb5dc988afe3911817e8
This commit is contained in:
ericlewis
2019-02-25 14:28:16 -08:00
committed by Facebook Github Bot
parent 918620bdcb
commit 78b167c735

View File

@@ -280,8 +280,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
*/
- (BOOL)touchesShouldCancelInContentView:(__unused UIView *)view
{
//TODO: shouldn't this call super if _shouldDisableScrollInteraction returns NO?
return ![self _shouldDisableScrollInteraction];
BOOL shouldDisableScrollInteraction = [self _shouldDisableScrollInteraction];
if (shouldDisableScrollInteraction == NO) {
[super touchesShouldCancelInContentView:view];
}
return !shouldDisableScrollInteraction;
}
/*