meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.36k stars 2.29k forks source link

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

Open EdgarHSM opened 4 years ago

EdgarHSM commented 4 years ago

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.
Abhijeetjaiswalit commented 4 years ago

Facing similar issue

Abhijeetjaiswalit commented 4 years ago

@EdgarHSM have you found any solution of this?

dohooo commented 3 years ago

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2