Skip to content

Fix RTL ScrollView position when content smaller than container#47280

Closed
NickGerleman wants to merge 1 commit into
facebook:mainfrom
NickGerleman:export-D65136654
Closed

Fix RTL ScrollView position when content smaller than container#47280
NickGerleman wants to merge 1 commit into
facebook:mainfrom
NickGerleman:export-D65136654

Conversation

@NickGerleman
Copy link
Copy Markdown
Contributor

@NickGerleman NickGerleman commented Oct 29, 2024

Summary:
Noticed in the screenshots of #47230 that Android's logic of setting scroll content origin to zero, then right aligning scroll offset, won't correctly handle case where content is smaller than scrolling container. We can fix that by only resetting the origin when content overflows container, since we otherwise are not scrollable, and scroll adjustment will not translate.

Changelog:
[Android][Fixed] - Fix RTL ScrollView position when content smaller than container

Differential Revision: D65136654

Summary:
Noticed in the screenshots of facebook#47230 that Android's logic of setting scroll content origin to zero, than right aligning scroll offset, won't correctly handle case where content is smaller than scrolling container. We can fix that by only resetting the origin when content overflows container, since we otherwise are not scrollable, and scroll adjustment will not translate.

Changelog:
[Android][Fixed] - Fix RTL ScrollView position when content smaller than container

Differential Revision: D65136654
@facebook-github-bot facebook-github-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 Oct 29, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D65136654

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 29, 2024
…book#47280)

Summary:

Noticed in the screenshots of facebook#47230 that Android's logic of setting scroll content origin to zero, then right aligning scroll offset, won't correctly handle case where content is smaller than scrolling container. We can fix that by only resetting the origin when content overflows container, since we otherwise are not scrollable, and scroll adjustment will not translate.

Changelog:
[Android][Fixed] - Fix RTL ScrollView position when content smaller than container

Differential Revision: D65136654
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 29, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 0df59d4.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @NickGerleman in 0df59d4

When will my fix make it into a release? | How to file a pick request?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants