cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.89k stars 3.82k forks source link

No scroll events fired when using keybindings #1217

Open osartun opened 6 years ago

osartun commented 6 years ago

We're using iscroll-probe with the probeType set to 3 meaning that a scroll event is fired whenever the slider is moved. However, activating the handy keybindings option and moving the slider via keyboard doesn't emit any events whatsoever.

What's happening is: scrollTo is called with time = 0. That's why the if-condition is true leading to _translate being executed instead of _animate. _animate would emit events. _translate doesn't.

https://github.com/cubiq/iscroll/blob/60ed6f8029b2e097a87399a2b3c688afd596980f/build/iscroll-probe.js#L861-L875

osartun commented 6 years ago

I created https://github.com/cubiq/iscroll/pull/1218 to solve that problem.