-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
This is being reproduced with the latest Expo SDK version 25, which uses React Native 52. But I haven't seen any fixes in the changelog since that so I'm assuming it's still happening.
The momentum scroll on Android are firing before the momentum actually ends. Contrary to iOS, which behaves as it should.
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 6.12.3
Yarn: 1.5.1
npm: 3.10.10
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz => 0.52.0
Steps to Reproduce
A snack to reproduce the issue: https://snack.expo.io/@abdallamohamed/onmomentumscroll-bug-on-android
Expected Behavior
Here's how it behaves on iOS:
During a momentum scroll, if you start another scroll:
- An
onScrollDragBegin
is fired. - When the user lifts their finger, an
onScrollDragEnd
is fired. - An
onMomentumScrollBegin
is fired and the scrollview starts scrolling. - When it finally stops, an
onMomentumScrollEnd
is fired.
Actual Behavior
- An
onScrollDragBegin
is fired. - When the user lifts their finger, an
onScrollDragEnd
is fired. - An
onMomentumScrollBegin
is fired, followed instantly by 2onMomentumScrollEnd
events. - The scrollview keeps scrolling and it finally stops.