Skip to content

Respect JS responder inside Fabric ScrollView#57050

Open
sorinc03 wants to merge 1 commit into
facebook:mainfrom
sorinc03:fix/ios-scrollview-panresponder
Open

Respect JS responder inside Fabric ScrollView#57050
sorinc03 wants to merge 1 commit into
facebook:mainfrom
sorinc03:fix/ios-scrollview-panresponder

Conversation

@sorinc03
Copy link
Copy Markdown
Contributor

@sorinc03 sorinc03 commented Jun 2, 2026

Summary:

Fixes #51970.

Fabric ScrollView currently only checks whether one of its own ancestors is the active JS responder before allowing UIKit to cancel touches and start scrolling. When a PanResponder is attached to content inside the ScrollView, the responder marker is set on that touched content view, so the ancestor-only check can miss it and the ScrollView can keep handling the gesture.

This updates the Fabric iOS ScrollView cancellation path to also walk the touched content view's ancestry. If the touched view or one of its parents inside the ScrollView is the active JS responder, the ScrollView keeps the existing behavior of not cancelling those touches to begin scrolling.

Changelog:

[IOS] [FIXED] - Respect active JS responders inside Fabric ScrollView content when deciding whether touches should start scrolling.

Test Plan:

  • node_modules/.bin/clang-format --dry-run --Werror packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm
  • git diff --check
  • env RCT_NEW_ARCH_ENABLED=1 xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -destination 'id=4FEBA81F-F2FA-453A-A039-2A62750D88FD' -derivedDataPath /tmp/rn-rntester-51970-derived ONLY_ACTIVE_ARCH=YES CODE_SIGNING_ALLOWED=NO build

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 2, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScrollView handles gestures while PanResponder is active

1 participant