meliorence / meliorence/react-native-snap-carousel

Carousel getting stuck on current index when scrolled vertically in Android

Open
#1,039 1 comment 0 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?

This is a bug report.

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes, this behavior is specific to the react-native-snap-carousel implementation on Android. Scrolling outside the carousel area functions correctly, which indicates the issue is within the carousel's touch handling logic.

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

The bug is specific to Android. It does not occur on iOS.

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

Yes, the bug is reproducible in a production environment.

Environment
  • Platform: Android
  • Library Version: react-native-snap-carousel 3.9.1
  • React Native Version: 0.72.7
Expected Behavior

The carousel should allow vertical scrolling of the app even when the gesture starts on the carousel area, without freezing or locking the carousel at its current index.

Actual Behavior

When the user tries to scroll the app vertically by starting the gesture within the carousel's area, the carousel freezes at the current index and doesn't allow proper vertical scrolling.

Reproducible Demo
<Carousel
  ref={this.carouselRef}
  data={entries}
  renderItem={this.renderItem}
  sliderWidth={screenWidth}
  itemWidth={screenWidth * 0.8}
  autoplay={true}
  autoplayInterval={1000}
  loop={true}
/>

Steps to Reproduce
  1. Render a react-native-snap-carousel inside a vertically scrollable view.
  2. Attempt to scroll vertically starting the gesture from within the carousel area.
  3. Observe that the carousel locks at its current index, preventing vertical scrolling.

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 by reproducing the issue with the provided Carousel configuration inside a vertically scrollable view on Android, then inspect the carousel's touch handling logic. Done means a vertical gesture beginning in the carousel area scrolls the surrounding app without freezing the carousel at its current index; verify the behavior in production mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.