swiper

Open full view…

Mousewheel Firefox skipping slide

Mike Grunwald
Fri, 08 May 2015 15:21:23 GMT

When using mousewheelControl: true, Firefox will skip multiple slides (at least one) when attempting to scroll. Not sure if it matters, but I'm on a Mac with at magic mouse. I'm wonder if there's any way to control this through the API (didn't see anything in the docs), or if I could potentially change the code to make this function as intended. Please let me know if need more details. Thanks in advance, _mike

Vladimir Kharlampidi
Fri, 08 May 2015 17:06:45 GMT

You can tweak this 60 ms delay in code https://github.com/nolimits4web/Swiper/blob/master/src/js/mousewheel.js#L62 But note, if you'll tweak it good for personal you, then other users may have issues

Mike Grunwald
Fri, 08 May 2015 17:30:26 GMT

Thanks for the response! I'm wondering if there has been any other talk about this situation? It happens on some of my co-workers machines as well.

Mike Grunwald
Fri, 08 May 2015 17:39:12 GMT

Also, that didn't solve the slides advancing more than once.

Mike Grunwald
Mon, 11 May 2015 15:29:06 GMT

I just noticed even the demo (http://www.idangero.us/swiper/demos/20-mousewheel-control.html) will skip slides in Firefox on a mac. This happens when using a Magic Mouse or the touch pad on a Macbook Pro.

Vladimir Kharlampidi
Mon, 11 May 2015 21:57:58 GMT

Did you have try to play with 60 ms delay? Of course, i can tweak it to fix behavior in FF, but it will break behavior in all other browsers :)

Mike Grunwald
Tue, 12 May 2015 16:52:50 GMT

I did mess with the delay where pointed me too, but I'm not sure I fully understand what's going on there. I had to take it all the way up to 700 ms in order for it to only advance a single slide in Firefox. This made it feel really sluggish/almost broken. I also saw that you were doing a check just above to get the proper mousewheel event, so I just wrapped that delay in a variable and changed the value based on the same check you were doing. This way it only affects the intended browsers. Thanks for your help.