Mess of autoplay with mousedrag | BUG
Issue description:
Autoplay become mess after drag actions, start to scroll any way and any time period
https://user-images.githubusercontent.com/89798830/156582970-6109cedd-a85e-481d-816f-e90a25df47de.mp4
Demo link/slider setting:
https://codepen.io/rozaljkeee/pen/qBVLvwd
Tiny-slider version: 2.9.4 Browser name && version: Any
It can also start to scroll in one side, but scroll several slides at once with different speed :/
Having similar issues (might be related): if autoplay starts and manual drag happens, it seems that the autoplay timing function is doubled, because suddenly the slide shifts happens more often (looks like 2 functions controlling/sliding the same objects)
This seems to only happen for us if autoplay: true, mouseDrag: true, and autoplayHoverPause:true. Disabling autoplayHoverPause seems to prevent it from repeating drag events.
This seems to only happen for us if autoplay: true, mouseDrag: true, and autoplayHoverPause:true. Disabling autoplayHoverPause seems to prevent it from repeating drag events.
v2.9.2
I confirm
If you remove the property autoplayHoverPause, then there is no problem. If you try to change the slides very quickly with the mouse, then they seem to change randomly (several times per second)
play bug on jsfiddle https://jsfiddle.net/Personality_fox/6wjd873g/
If you want to stop auto play onhover event use this trick https://jsfiddle.net/Personality_fox/6wjd873g/5/
const sliderTns = tns({
container: "#slider",
items: 1,
slideBy: 1,
autoplay: true,
autoplayTimeout: 1000,
mouseDrag: true,
lazyload: true,
});
const slider = document.getElementById('slider');
slider.addEventListener('mouseover', () => {sliderTns.pause()})
slider.addEventListener('mouseout', () => {sliderTns.play()})