meliorence / meliorence/react-native-snap-carousel

Opening react-navigation drawer mid carousel scroll makes carousel get stuck

Open
#622 3 comments 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?

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?

Yes, it isn't.

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

Android 9

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

Yes

Environment:
"react": "16.8.6",
"react-native": "0.60.0",
"react-native-snap-carousel": "^3.8.4",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^1.4.0",
"@react-navigation/core": "*",
"@react-navigation/native": "*",

Target Platform:
Android (9.0)

Expected Behavior

I know this is a very specific use case that is hard to trigger, but it is a bug nonetheless. You'll need a physical device to test this. With one hand start scrolling the carousel and stop midway before snapping to the next item, with out releasing your finger, use your other hand to swipe from the edge of the screen left to right to open the drawer. At this point you can release both fingers. Finally close the drawer.

I expected the carousel to snap to the closest slide after closing the drawer.

Actual Behavior

The carousel doesn't snap to either item, it gets stuck in between. Tapping/scrolling on the carousel gets it unstuck.

image

image

Reproducible Demo

Snack: https://snack.expo.io/@eddyserrano/3c73a1

Steps to Reproduce
  1. Run the snack demo on a physical device.
  2. With one hand start scrolling the carousel and stop midway before snapping to the next item.
  3. With out releasing your finger, use your other hand to swipe from the edge of the screen left to right to open the drawer.
  4. Close the drawer.
  5. Witness the carousel get stuck.

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 running the linked Snack on a physical Android device and reproduce the two-finger interaction: pause the carousel mid-scroll, open the drawer, then close it. Trace the carousel's gesture and scroll handling around the drawer interaction; done means the carousel snaps to the closest slide after the drawer closes.

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.