antonreshetov / vue-glide

A slider and carousel as vue component on top of the Glide.js
https://antonreshetov.github.io/vue-glide/
MIT License
269 stars 39 forks source link

Hadle clicks on 2 glides' slides differently #21

Closed skourta closed 5 years ago

skourta commented 5 years ago

I have 2 glides and I want to only handle the clicks on one glide but not the other! right now handling the event @glide:slide-click handles both glides. shouldn't the event be launched only from the glide?

antonreshetov commented 5 years ago

Hi @skourta @glide:slide-click it's a custom event that provides only vue-glide, not glide.js itself. When type is carousel, glide.js clone DOM slides, these are not vue components on which you can trigger an event. https://github.com/antonreshetov/vue-glide/blob/master/src/components/Glide.js#L270

But I agree, I need to find a solution to this problem

skourta commented 5 years ago

@antonreshetov I did a workaround by wrapping the content inside a div and giving it the onclick it works on single slide view but when there 3 slides by view the one with the class glide__slide--clone" kills the event I don't know why!

antonreshetov commented 5 years ago

@skourta should be fixed in #22

BorisKamp commented 1 year ago

@antonreshetov

This does not seem fixed, Im still having the problem using "vue-glide-js": "^1.3.14" and "nuxt": "^2.17.0" and "vue": "^2.7.10"