tiny-slider
tiny-slider copied to clipboard
The bug is still showing when **autoplayHoverPause** is set as **true**
The bug is still showing when autoplayHoverPause is set as true
Wrong behavior when we combine ( "mouseDrag": true and "autoplayHoverPause": true)
Originally posted by @davson584 in https://github.com/ganlanyuan/tiny-slider/issues/298#issuecomment-439031788
I have this exact same issue with version 2.9.2. Following this for hopefully a quick fix.
+1 I'm also seeing this in 2.9.2, when using autoplayHoverPause the timeout isn't reset when manuallly switching slide.
😢 Same issue with version 2.9.2
I can confirm that this still is quite the issue!
Is there a quick fix yet?
This additional check should help http://prntscr.com/pr3rj6
Hi @ganlanyuan , can you check it? The solution of @slavanau12 ?
Same problem here...
I have the same problem in 2.9.3. any solution?
Same problem. Package is death?
same issue. 2.9.4
Have same problem. This error can be fixed by adding "clearInterval(autoplayTimer);" to the "setAutoplayTimer" function
Same problem version 2.9.4
Here is a working solution without any hacks. It was tested on v2.9.3.
var checkRestartAutoplay = function (config, slider) {
var info = slider.getInfo();
setInterval(function () {
if (slider.lastPlayed && Date.now() - slider.lastPlayed > config.autoplayTimeout && !info.container.matches(':hover')) {
slider.play();
slider.lastPlayed = Date.now();
}
}, 100);
}
var slider = tns({
container: '#mySlider',
controls: true,
autoplay: true,
rewind: true, // Must be enabled
items: 4,
gutter: 20,
autoplayHoverPause: true,
arrowKeys: false,
mouseDrag: true
})
slider.lastPlayed = null;
slider.events.on('indexChanged', function (info) {
slider.lastPlayed = Date.now();
})
if (config.autoplay) {
checkRestartAutoplay(config, slider);
}