NickPiscitelli/Glider.js

Slider resets after scroll down on mobile devices

Opened this issue · 4 comments

HI!
Thanks for useful library!
Encountered weird issue on mobile devices.

When slider is scrolled and you swipe down past it on mobile at some point it resets to the start position.
Couldn't replicate it to debug on desktop but it happens on both iOS and Android devices.
Here's the live page where you can test it - https://great.com/en-us/online-casino/

@NickPiscitelli thanks!

Which version would you recommend?

Would it help if i'll share slider init options?

@NickPiscitelli

also, I've just checked the demos on the documentation page and it seems that it does happen in all of the cases, just a bit different.
The thing is that you can free drag it partially, and when you swipe up or down the page after, it will set the slider to the nearest slide. In my case it resets to the first slide, but the principle is the same.
(all of it happens on mobile devices only)

@NickPiscitelli

False alarm :)

The 'resizeLock: false' helped to fix it.
As I've found out, in mobile browsers scrolling up/down fires Resize event sometimes (could it be the hide/show of address bar?) and thus triggers locking to the nearest slide if resizeLock is set to true.