nathansearles / slidesjs

SlidesJS is obsolete and no longer maintained.
https://nathansearles.github.io/slidesjs/
1.72k stars 357 forks source link

Fix pauseontouch #589

Open figureone opened 9 years ago

figureone commented 9 years ago

When config options pauseOnHover and auto are set to true, slide transitions stop when the mouse is over the slides container (this is done via mouseenter and mouseleave events).

However, transitions are not paused on a mobile device when the slides are being dragged via touch.

This patch pauses transitions by triggering mouseenter and mouseleave in the touchstart and touchend events, respectively.

Note that I did not compile the coffeescript nor generate a minified version in this pull request.

Thanks for your awesome slider!