meliorence / meliorence/react-native-snap-carousel
Carousel getting stuck on current index when scrolled vertically in 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?
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 ([]).)
- 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, 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
- Render a react-native-snap-carousel inside a vertically scrollable view.
- Attempt to scroll vertically starting the gesture from within the carousel area.
- Observe that the carousel locks at its current index, preventing vertical scrolling.
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 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