check whether autoplay actually should be restarted after hover #71

wants to merge 1 commit into from

2 participants


If you set autoplayPauseOnHover to true but autoplay to false, on initialization, you end up with a carousel that is initially paused, but that starts autoplaying as soon as user mouse moves over it and out again.

Here's a simple demo of the bug:

Open console and note that the carousel is initially paused, but once you mouse over it and mouse out, autoplay starts and isAutoplaying is now true.

Here's the demo after my fix:

Thanks for the great project, it's very nicely done!

PS. I wasn't sure what you use for minification, so I did not update the minified version of the code.


similar problem:
autoplay: true
autoplayPauseOnHover: true
and btnToggleAutoplay is set;
Now, whenever i stop autoplay by clicking on btnToggleAutoplay and then hover over any item and mouse out again, it starts autoplaying although it should still be in "stop"-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment