meliorence / meliorence/react-native-snap-carousel

Multiple small items not scrolling with momentum on iOS [Needs Fixing on latest version 3.8.4]

Open
#614 16 comments 2 reactions 0 assignees View on GitHub

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?

Yes, A Bug report.

Have you followed the required steps before opening a bug report?
Have you made sure that it wasn't a React Native bug?

Not sure.

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Only happening on iOS, working fine on Android, tested on simulator and physical devices.

Is the bug reproductible in a production environment (not a debug one)?

Yes happening in production env also.

Environment

I have been using expo environment to develop, its on the latest expo version sdk 35, and i have tested with the latest snap carousel version. react and react native versions are latest that are supported by the expo sdk.

Environment:
React: 16.8.3
React native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz
react-native-snap-carousel: 3.8.3

Target Platform:
iOS (12.4.2)

Expected Behavior

Scrolling multiple item should be smooth like the android system.

Actual Behavior

Scrolling multiple small items horizontally with momentum is only scrolling 1 item, sometimes it looks like that its going to scroll multiple items but then it either doesn't snap to the center of the carousel or just returns back to the last item which was next to the previously centered item.

Reproducible Demo

https://snack.expo.io/@summersyed/snap-carousel-momentum-scroll-bug

Steps to Reproduce
  1. just try to scroll carousel in the above link to either left or right side, using swing gesture. which should scroll multiple item with one swipe.
  2. see that it only scrolls 1 item at a time.
  3. try this couple of times to check it carefully.

although bug is apparent on the iOS simulator provided with expo, you can check it out more clearly on an actual iOS physical device, I have tested it on iPhone 6 and iPhone X, both are not able to scroll multiple items on dev and prod version of the app.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Expo Snack reproducible demo and reproduce the horizontal momentum gesture on iOS simulator and physical devices. Compare the behavior with Android using the reported React Native Snap Carousel 3.8.x environment. Done means a swipe across multiple small items advances through multiple items and reliably snaps the next item to the center on iOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.