meliorence / meliorence/react-native-snap-carousel
onSnapToItem & onBeforeSnapToItem do not fire reliably on left / right edges on Android
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is this a bug report, a feature request, or a question?
Bug report
Have you followed the required steps before opening a bug report?
(Check the step you've followed - replace the space character between the square brackets ([]) by an x.)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn't already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn't a React Native bug?
Yes.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Android only, I believe
Is the bug reproductible in a production environment (not a debug one)?
Yes.
Environment
Env:
-
React: 16.6.0-alpha.8af6728
-
react-native: 0.57.4
-
react-native-snap-carousel: 3.7.5
Target platform:
- Android 7.1
Expected Behavior
Expected onSnapToItem to be fired reliably for every index.
Actual Behavior
onSnapToItem does not fire if scrolling all the way to the left or right edges.
gfycat video (look at the bottom for the Active index display)
Reproducible Demo
https://snack.expo.io/SJ6vPURhm
Steps to Reproduce
From the example, scroll to a middle slide on Android.
Scroll all the way to the left or right and release.
The state index is not updated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Expo reproducible demo and the repository example, reproducing the Android 7.1 behavior by scrolling from a middle slide to either edge. Trace where onSnapToItem and onBeforeSnapToItem are triggered and verify the index state update at both edges. Done means both callbacks fire reliably for every index, including the leftmost and rightmost slides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100