ismail9k / vue3-carousel

Vue 3 carousel component
https://ismail9k.github.io/vue3-carousel/
MIT License
653 stars 162 forks source link

Dragging slides (swipe) with mouse fires click event. #375

Open mkyoon opened 2 weeks ago

mkyoon commented 2 weeks ago

Describe the bug After upgrade to v0.3.3, dragging slides (swipe) with mouse fires click event.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/p/sandbox/vue3-carousel-example-01-forked-k2m47s'
  2. Drag with mouse on 'Carousel'
  3. After dragging, window opens 'google.com'

Expected behavior v.0.3.3 : Dragging with mouse is just swipes slides. Not capturing click events. v0.3.1 : Everything is OK.

Screenshots

Desktop (please complete the following information):

mkyoon commented 2 weeks ago

Using 'isSliding' data, I could solve this issue.

@slide-start="isSliding = true" @slide-end="isSliding = false"

Is there any clever way to bypass this click events?