-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal ScrollView Resets Scroll Position (Android, RTL) #19979
Comments
Summary: Fix the calculation of offsetX in onLayout (ReactHorizontalScrollContainerView.java) that re-positions the updated layout. A private instance variable (oldWidth) is added in order to track the width difference between consecutive updates. (Issue report: #19979) Reviewed By: mdvacca Differential Revision: D8772780 fbshipit-source-id: 969dcead550f4a3d24d06416b63d960492b7a124
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Same problem with a ScrollView that has inverted property set. |
Same problem for me! |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
can anyone verify that the fix in 0.58.6 commit #23233 did the fix ? |
Hello there 👋 I tried this on 0.59.x with the code you provided and it seems to be fixed. But please, if it's actually still an issue with 0.59 please comment below and we can reopen it 😊 |
I have the same problem |
No I did not fix that! |
Environment
Description
Horizontal ScrollViews reset their scroll position when their content size changes on Android in RTL.
That description is a mouthful so here is a gif showing the problem:
Reproducible Demo
Here is a snack from expo made by @megantracy93 https://snack.expo.io/@meganltracy/scrollview-scrolltoend-rtl-issue
Steps to Reproduce:
Observed
Expected
Additional Info
From some debugging, we think ReactHorizontalScrollContainerView is likely the class which is responsible for positioning the horizontal ScrollView onLayout. That method gets called whenever the size of the contents change and resets the scroll position of the view. Instead, it should be setting it back to where it was before.
The text was updated successfully, but these errors were encountered: