When using Pressable inside a horizontal carousel, the scroll is registered as a tap
See original GitHub issue "react-native-reanimated": "2.2.4",
"react-native-reanimated-carousel": "^2.3.2",
"react-native-gesture-handler": "^2.3.2",
I’m using the Carousel in its default mode horizontally scrolling. When the items rendered use Pressable and the user scrolls horizontally, the scroll happens but a press is also registered when lifting the finger. If I swap Pressable for a Gesture Handler Touchable, the error disappears.
Please advise, thank you.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Carousel / Side-scroll / Horizontal Scroll – Adobe XD Feedback
Currently there is a "scroll" feature in build, but it seems to be about page scroll and up/down scrollable areas.
Read more >UICollectionView scroll to item not working with horizontal ...
I have this issue: when button tapped (for horizontal collection scroll to next item) it always returns to first item with UI bug....
Read more >Taps, drags, and other gestures - Flutter documentation
This document explains how to listen for, and respond to, gestures in Flutter. Examples of gestures include taps, drags, and scaling. The gesture...
Read more >Designing A Perfect Carousel UX - Smashing Magazine
Do Users Actually Use Carousels? Scrolling Direction; Replace Progress Dots with Labels; Replace Progress Dots With A Horizontal Slider ...
Read more >6 Steps to Add Horizontal and Vertical Scrolling in Figma
Create your design using templates, drag-and-drop, etc. Step 3. Select the part you want to scroll Figma and then press "CTRL+G" to group...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@diego-paired @halaxysounds
I have reproduced your problem. I used the same version. @diego-paired
Can you give it a try and let me know the result? I believe this is solvable, because most people haven’t talked to me about this kind of problem, and they’ve obviously used the solution here.
Hi @diego-paired and @dohooo, To give maybe a hint, In my case, I have the same problem only with Android when the carousel is under a modal, otherwise the carousel works fine. The problem appear when the carousel is under a modal with a touchable opacity (from react-native library or gesture handler is the same), but i can’t scroll the carousel in my case, the onPress action trigger immediately .
The Component under modal
The carousel item component
My package json
I hope this will help you !