Skip to content

Allow to disable shouldDelayChildPressedState on scrollable Android containers (#57259)#57259

Closed
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D108003375
Closed

Allow to disable shouldDelayChildPressedState on scrollable Android containers (#57259)#57259
j-piasecki wants to merge 1 commit into
react:mainfrom
j-piasecki:export-D108003375

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary:

X-link: #57128

Changelog: [Android][Added] Added an entry point that allows changing whether the scrollable React Native containers should delay pressed state in children views

Scrollable Android containers should return true (the default implementation) from shouldDelayChildPressedState in order to delay pressed state feedback in children. This way the feedback isn't triggered at all during quick scrolls.

React Native touch system doesn't rely on this so it's not affected by that behavior, but native components are which can produce a divergent experience. This diff adds a property to all scrollable components of React Native which allows external consumers to control this behavor on a per-view basis. The API is analoguous to delaysContentTouches on iOS.

Differential Revision: D108003375

@meta-codesync

meta-codesync Bot commented Jun 18, 2026

Copy link
Copy Markdown

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108003375.

@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 18, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner labels Jun 18, 2026
@facebook-github-tools facebook-github-tools Bot added the p: Facebook Partner: Facebook label Jun 18, 2026
…ontainers (react#57259)

Summary:

X-link: react#57128

Changelog: [Android][Added] Added an entry point that allows changing whether the scrollable React Native containers should delay pressed state in children views

Scrollable Android containers should return `true` (the default implementation) from [`shouldDelayChildPressedState`](https://developer.android.com/reference/android/view/ViewGroup#shouldDelayChildPressedState%28%29) in order to delay pressed state feedback in children. This way the feedback isn't triggered at all during quick scrolls.

React Native touch system doesn't rely on this so it's not affected by that behavior, but native components are which can produce a divergent experience. This diff adds a property to all scrollable components of React Native which allows external consumers to control this behavor on a per-view basis. The API is analoguous to [`delaysContentTouches`](https://developer.apple.com/documentation/uikit/uiscrollview/delayscontenttouches?language=objc) on iOS.

Differential Revision: D108003375
@meta-codesync meta-codesync Bot changed the title Allow to disable shouldDelayChildPressedState on scrollable Android containers Allow to disable shouldDelayChildPressedState on scrollable Android containers (#57259) Jul 3, 2026
@j-piasecki j-piasecki force-pushed the export-D108003375 branch from 5336362 to d0e7a59 Compare July 3, 2026 09:14
@meta-codesync meta-codesync Bot closed this in 91b2537 Jul 3, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 3, 2026
@meta-codesync

meta-codesync Bot commented Jul 3, 2026

Copy link
Copy Markdown

This pull request has been merged in 91b2537.

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. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant