-
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
[iOS] Scrollviews inside row doesn't fire onMomentumScrollEnd #46592
Comments
up |
Hey @GuilhermeHCDias, the repro seems to be a default starting react native app. I think you might forget to push the changes. |
|
You're right, man! So sorry, i've pushed the updates. Thank you! |
@GuilhermeHCDias I am not sure if I understand that correctly, but it seems like the scrollviews-issue-recording.mov |
So, what happens is that some scrollviews don’t trigger, while others do. If I perform the movement abruptly, it triggers, but if I do it slowly, it doesn’t. I’m running the example on an iPhone 16 Pro, but it happens on other devices as well. Is something with snapToInterval or onMomentumScrollEnd. Thank you for your try Screen.Recording.2024-10-03.at.10.56.36.mov |
@GuilhermeHCDias I can see the problem now, thanks! |
I’ve also tested it on other versions, including the latest unstable release (0.76.0-rc.3), but the issue still persists. |
mhm and you also see this issue happen on Android? It seems to be fine there 🤔 |
Sorry for the delay, I’ve been swamped lately. I tested it again on Android, and the bug didn’t show up this time, but it’s weird because I remember seeing it happen before on Android too. |
Yeah, man, you’re right! This doesn’t happen on Android, i've tested on 3 different Android versions on 3 different devices.
|
Awesome! Thank you so much for also checking this out 😁 |
Thank you for updates |
Description
I tried to reproduce this same issue with the "old" architecture, and it works correctly, even though there's a closed issue due to inactivity (#32592) that describes this problem. However, it functions correctly in the old architecture. This issue only occurs in the new architecture.
When inserting 3 or more ScrollViews inside a View that has the style:
flex-direction: 'row'
, theonMomentumScrollEnd
event is not triggered in one of the ScrollViews. ThesnapToInterval
also doesn't work correctly, and is ignored. I imaginesnapToInterval
relies ononMomentumScrollEnd
or something similar to it.For some reason, if the ScrollView container takes up the full width of the device, the bug doesn't occur.
If you use any horizontal padding, the bug occurs.
If you place any element next to the ScrollViews, the bug occurs.
If you use margin, the bug doesn't occur.
In my reproduction, I included all these examples. Perhaps it is something related to the
contentContainer
of the ScrollView? I'm not sure. I tried reproducing as many scenarios as possible to reach a conclusion.The bug occurs in Android and iOS(I don't tested in other devices)
Steps to reproduce
yarn
.pod-install
if you want to use iOS devices.yarn android
oryarn ios
.React Native Version
0.75.3
Affected Platforms
Runtime - Android, Runtime - iOS
Areas
JSI - Javascript Interface
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/GuilhermeHCDias/new-arch-scrollview-bug
Screenshots and Videos
The text was updated successfully, but these errors were encountered: