Emiliano-Bucci / react-spring-carousel-js

A new Carousel experience for the modern Web
https://react-spring-carousel-js.emilianobucci.com
80 stars 6 forks source link

Prevent link being clicked after drag ends #14

Closed jbowa closed 2 years ago

jbowa commented 3 years ago

Hey Emiliano, Thank you for this package - love how smooth it is. Wondering if you have solved this, I have created a corousel with child elements wrapped in a link like so:

items = [
<a href="/some-link" draggable={false}>
  <Content />
</a>,
...
]

When drag is enabled, after dragging the elements onClick handler is fired and redirects. Is there a way to stop this event from firing? I have tried pointer-events: none but this also disables the ability to click on the link. Thank you