Skip to content
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

Carousel getting stuck on current index when scrolled vertically in Android #1039

Open
5 tasks done
harshagrawal2412 opened this issue Jan 25, 2025 · 1 comment
Open
5 tasks done

Comments

@harshagrawal2412
Copy link

harshagrawal2412 commented Jan 25, 2025

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}
/>

rn-carousel.mov

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.
@harshagrawal2412
Copy link
Author

Anyone faced this similar issue or any lead to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant