-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Fix unexpected ScrollView fling behavior due to Android P bug workaround #34233
Fix unexpected ScrollView fling behavior due to Android P bug workaround #34233
Conversation
Some custom logic is applied to workaround a platform bug where velocity may be incorrect on Android P. [The bug in question](https://issuetracker.google.com/issues/112385925) appears to have been fixed before Android `Q` was released, so we shouldn't *need* to apply the workaround on other versions. As described in facebook#34226 the workaround can adversely affect certain scroll behaviors, which can easily be reproduced when you briefly scroll one direction then quickly fling the opposite direction (see the video in the linked ticket). This PR changes the workaround to *only* be applied on Android P, in order to avoid causing weird scroll behavior on versions that are not actually affected by the bug the workaround is working around.
Hi @dhleong! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Hey @dhleong Can I ask you to sign the CLA so we can move this forward? |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Hello @dhleong I have this issue on my OnePlus 5T running Android 10, shouldn't this fix already be running on my device? Do you think I'm missing something? |
@thomasgrivet Sorry, I'm not sure I understand your question. This is a proposed change to fix the issue; unless you have merged it into your own fork and are running a custom build of react-native containing this fix, it's unlikely that it would be running on your device. |
@ryancat has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
From the linked issue tracker (https://issuetracker.google.com/issues/112385925?pli=1), this issue seems fixed already. We should verify that and drop the workaround all together. Meanwhile, I think the change here makes sense. Will import and ship. |
This pull request was successfully merged by @dhleong in c7c263d. When will my fix make it into a release? | Upcoming Releases |
…und (facebook#34233) Summary: Some custom logic is applied to workaround a platform bug where velocity may be incorrect on Android P. [The bug in question](https://issuetracker.google.com/issues/112385925) appears to have been fixed before Android `Q` was released, so we shouldn't *need* to apply the workaround on other versions. As described in facebook#34226 the workaround can adversely affect certain scroll behaviors, which can easily be reproduced when you briefly scroll one direction then quickly fling the opposite direction (see the video in the linked ticket). This PR changes the workaround to *only* be applied on Android P, in order to avoid causing weird scroll behavior on versions that are not actually affected by the bug the workaround is working around. ## Changelog ``` [Android] [Fixed] - Fix occasionally incorrect ScrollView fling behavior ``` Pull Request resolved: facebook#34233 Test Plan: - Repro the strange fling behavior in the current version (See video attached in facebook#34226) - Verify that the string fling behavior is fixed with this patch - Verify that fling behavior still works as expected on Android versions affected by the [original bug](https://issuetracker.google.com/issues/112385925), and those immediately following it (to verify that the bug being worked around was, in fact, fixed as expected). Reviewed By: javache Differential Revision: D38287277 Pulled By: ryancat fbshipit-source-id: 2c786872c4d41655b3849bb92e02f1f16c663b41
…und (facebook#34233) Summary: Some custom logic is applied to workaround a platform bug where velocity may be incorrect on Android P. [The bug in question](https://issuetracker.google.com/issues/112385925) appears to have been fixed before Android `Q` was released, so we shouldn't *need* to apply the workaround on other versions. As described in facebook#34226 the workaround can adversely affect certain scroll behaviors, which can easily be reproduced when you briefly scroll one direction then quickly fling the opposite direction (see the video in the linked ticket). This PR changes the workaround to *only* be applied on Android P, in order to avoid causing weird scroll behavior on versions that are not actually affected by the bug the workaround is working around. ## Changelog ``` [Android] [Fixed] - Fix occasionally incorrect ScrollView fling behavior ``` Pull Request resolved: facebook#34233 Test Plan: - Repro the strange fling behavior in the current version (See video attached in facebook#34226) - Verify that the string fling behavior is fixed with this patch - Verify that fling behavior still works as expected on Android versions affected by the [original bug](https://issuetracker.google.com/issues/112385925), and those immediately following it (to verify that the bug being worked around was, in fact, fixed as expected). Reviewed By: javache Differential Revision: D38287277 Pulled By: ryancat fbshipit-source-id: 2c786872c4d41655b3849bb92e02f1f16c663b41
Summary
Some custom logic is applied to workaround a platform bug where velocity may be incorrect on Android P. The bug in question appears to have been fixed before Android
Q
was released, so we shouldn't need to apply the workaround on other versions.As described in #34226 the workaround can adversely affect certain scroll behaviors, which can easily be reproduced when you briefly scroll one direction then quickly fling the opposite direction (see the video in the linked ticket).
This PR changes the workaround to only be applied on Android P, in order to avoid causing weird scroll behavior on versions that are not actually affected by the bug the workaround is working around.
Changelog
Test Plan