mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-18 12:38:45 +08:00
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:
committed by
Facebook Github Bot
parent
918620bdcb
commit
78b167c735
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user