Skip to content

[Web] Make ScrollView an intercepting detectors - #4528

Open
m-bert wants to merge 1 commit into
mainfrom
@mbert/web-intercepting-scrollview
Open

m-bert wants to merge 1 commit into
mainfrom
@mbert/web-intercepting-scrollview

Conversation

@m-bert

@m-bert m-bert commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Description

On Android and iOS the ScrollView wrappers are created with GestureDetectorType.Intercepting, so a VirtualGestureDetector rendered inside them has an intercepting ancestor. The web wrappers were created with the default detector type, so the same code throws

VirtualGestureDetector must be a descendant of an InterceptingGestureDetector

This PR passes GestureDetectorType.Intercepting to the web ScrollView

Test plan

Checked ScrollView example

Copilot AI lite review requested due to automatic review settings September 17, 2026 14:21
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 80fbf189-0b8f-455f-8484-023365077011

📥 Commits

Reviewing files that changed from the base of the PR and between 5d1c171 and 0c23611.

📒 Files selected for processing (1)
  • packages/react-native-gesture-handler/src/v3/components/GestureComponents.web.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved web scrolling behavior by ensuring ScrollView properly intercepts relevant gestures.

Walkthrough

The web ScrollView wrapper now passes GestureDetectorType.Intercepting to createNativeWrapper while retaining the existing interruption option.

Changes

ScrollView gesture wrapper

Layer / File(s) Summary
Configure intercepting ScrollView wrapper
packages/react-native-gesture-handler/src/v3/components/GestureComponents.web.tsx
The file imports GestureDetectorType and passes GestureDetectorType.Intercepting as the third argument to createNativeWrapper. The disallowInterruption: false option remains unchanged.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 0c236

The web ScrollView now uses the intended intercepting gesture detector, with no concrete current-head failure established.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: making the web ScrollView use intercepting gesture detectors. The grammar is imperfect, but the meaning is clear.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change matches native behavior and has no unresolved review comments.

Pull request overview

Updates the web ScrollView to use intercepting gesture-detector behavior, matching native platforms.

Changes:

  • Applies GestureDetectorType.Intercepting to the web ScrollView.
File summaries
File Description
packages/react-native-gesture-handler/src/v3/components/GestureComponents.web.tsx Makes the web ScrollView an intercepting detector.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@m-bert
m-bert requested a review from j-piasecki September 17, 2026 14:30

This branch has not been deployed

No deployments
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