gs-shop / vue-slick-carousel

🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay
https://gs-shop.github.io/vue-slick-carousel/
Other
810 stars 184 forks source link

slick autoplays in Chrome even if prop autoplay is set to false #229

Open ChobotX opened 2 years ago

ChobotX commented 2 years ago

In our case, where we convert PNGs to WEBP images on the fly, vue-slick-slider fires afterChange event with currentSlide = 1 without any visible change. Prop autoplay is set to false.

After some investigation we found that this line https://github.com/gs-shop/vue-slick-carousel/blob/master/src/InnerSlider.vue#L91 should probably be if (spec.autoplay) instead of if (this.autoPlay)

francisashley commented 1 year ago

Can confirm the if (this.autoPlay) expression is testing against an internal method (and not the prop) so is always truthy.

This is resulting in the initialSlide option randomly breaking.

Major bug, this one.

KuncevichAleksandr commented 1 year ago

We forked lib and fixed this problem https://github.com/bitbuilderz/vue-carousel-improved