Skip to content

Conversation

zeyap
Copy link
Contributor

@zeyap zeyap commented Sep 25, 2025

Summary:

Changelog:

[Android] [Changed] - Add responderIgnoreScroll prop on ScrollView

When it's set to true (default), emit touchcancel from native Android ScrollView, instead of letting Responder System terminate responder at scroll. When false, onTouchCancel on ScrollView children will not be invoked, but
onTouchEnd will be invoked (if touch starts on it) - which aligns with iOS.

Allow opting in this new behavior at component level because (1) touchCancel is meaningful especially on android, and dev may be using onTouchCancel handler, if we enable this everywhere the handler is broken, (2) there's likely some issue in responder system when transferring js responder

Differential Revision: D82761242

@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 Sep 25, 2025
@facebook-github-bot
Copy link
Contributor

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating diff in D82761242.

zeyap added a commit to zeyap/react-native that referenced this pull request Sep 25, 2025
Summary:

## Changelog:

[Android] [Changed] - Add responderIgnoreScroll prop on ScrollView

When it's set to true (default), emit touchcancel from native Android ScrollView, instead of letting Responder System terminate responder at scroll. When false, `onTouchCancel` on ScrollView children will not be invoked, but
`onTouchEnd` will be invoked (if touch starts on it) - which aligns with iOS.

Allow opting in this new behavior at component level because (1) touchCancel is meaningful especially on android, and dev may be using onTouchCancel handler, if we enable this everywhere the handler is broken, (2) there's likely some issue in responder system when transferring js responder

Differential Revision: D82761242
@facebook-github-bot
Copy link
Contributor

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating diff in D82761242.

@react-native-bot
Copy link
Collaborator

react-native-bot commented Sep 25, 2025


Warnings
⚠️ ❗ JavaScript API change detected - This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API. Please include a clear changelog message. This change will be subject to extra review.

This change was flagged as: BREAKING

Generated by 🚫 dangerJS against dd78d2f

Summary:

## Changelog:

[Android] [Changed] - Add responderIgnoreScroll prop on ScrollView

When it's set to true (default), emit touchcancel from native Android ScrollView, instead of letting Responder System terminate responder at scroll. When false, `onTouchCancel` on ScrollView children will not be invoked, but
`onTouchEnd` will be invoked (if touch starts on it) - which aligns with iOS.

Allow opting in this new behavior at component level because (1) touchCancel is meaningful especially on android, and dev may be using onTouchCancel handler, if we enable this everywhere the handler is broken, (2) there's likely some issue in responder system when transferring js responder

Differential Revision: D82761242
zeyap added a commit to zeyap/react-native that referenced this pull request Sep 25, 2025
Summary:

## Changelog:

[Android] [Changed] - Add responderIgnoreScroll prop on ScrollView

When it's set to true (default), emit touchcancel from native Android ScrollView, instead of letting Responder System terminate responder at scroll. When false, `onTouchCancel` on ScrollView children will not be invoked, but
`onTouchEnd` will be invoked (if touch starts on it) - which aligns with iOS.

Allow opting in this new behavior at component level because (1) touchCancel is meaningful especially on android, and dev may be using onTouchCancel handler, if we enable this everywhere the handler is broken, (2) there's likely some issue in responder system when transferring js responder

Differential Revision: D82761242
zeyap added a commit to zeyap/react-native that referenced this pull request Sep 25, 2025
Summary:
## Changelog:

[Android] [Changed] - Do not emit touchCancel at scroll if responderIgnoreScroll is disabled

Last change facebook#53951 added `responderIgnoreScroll` prop to ScrollView on android; here is native implementation

Differential Revision: D82675049
@facebook-github-bot
Copy link
Contributor

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating diff in D82761242.

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. fb-exported meta-exported p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants