Skip to content

Honor collapsableChildren on the Android horizontal ScrollView content view - #60205

Open
lazerg wants to merge 2 commits into
react:mainfrom
lazerg:fix/issue-60183-horizontal-collapsable-children
Open

lazerg wants to merge 2 commits into
react:mainfrom
lazerg:fix/issue-60183-horizontal-collapsable-children

Conversation

@lazerg

@lazerg lazerg commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Summary:

On Android, a horizontal ScrollView ignores collapsableChildren={false} on its content view, so maintainVisibleContentPosition loses empty anchor views that Fabric flattens away. AndroidHorizontalScrollContentViewShadowNode never reads the prop. This sets ChildrenFormStackingContext from collapsableChildren, the same way ScrollContentViewShadowNode does for the vertical case.

Fixes #60183

Changelog:

[ANDROID] [FIXED] - Honor collapsableChildren on the horizontal ScrollView content view so maintainVisibleContentPosition can anchor on empty views

Test Plan:

Not run on a device, no Android SDK here. The change mirrors ScrollContentViewShadowNode::initialize. The repro from the issue should now grow the horizontal offset by 100 per press.

@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 Nov 21, 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 Nov 21, 2026

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

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.

[Android] Horizontal ScrollView ignores collapsableChildren, so maintainVisibleContentPosition loses empty anchor views

1 participant