Skip to content

[iOS] Fix ScrollView detection when used with NativeDetector#3888

Merged
j-piasecki merged 1 commit intonextfrom
@jpiasecki/fix-scrollview-detection
Jan 12, 2026
Merged

[iOS] Fix ScrollView detection when used with NativeDetector#3888
j-piasecki merged 1 commit intonextfrom
@jpiasecki/fix-scrollview-detection

Conversation

@j-piasecki
Copy link
Member

Description

Our check for ScrollView was checking for RCTScrollViewComponentView, but inside NativeDetector, we extract contentView from RCTViewComponentViews:

if ([view isKindOfClass:[RCTViewComponentView class]]) {
RCTViewComponentView *componentView = (RCTViewComponentView *)view;
if (componentView.contentView != nil) {
view = componentView.contentView;
}
}

And it so happens that RCTScrollViewComponentView inherits from RCTViewComponentView, which broke the ScrollView detection. The contentView of RCTScrollViewComponentView is RCTEnhancedScrollView.

Test plan

ScrollView from RNGH should now correctly delay touches on native buttons.

@j-piasecki j-piasecki merged commit 59c3de7 into next Jan 12, 2026
3 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/fix-scrollview-detection branch January 12, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants