Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

No scroll events fired when using keybindings #1217

Open
osartun opened this issue Dec 18, 2017 · 1 comment · May be fixed by #1218
Open

No scroll events fired when using keybindings #1217

osartun opened this issue Dec 18, 2017 · 1 comment · May be fixed by #1218

Comments

@osartun
Copy link

osartun commented Dec 18, 2017

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.

scrollTo: function (x, y, time, easing) {
easing = easing || utils.ease.circular;
this.isInTransition = this.options.useTransition && time > 0;
var transitionType = this.options.useTransition && easing.style;
if ( !time || transitionType ) {
if(transitionType) {
this._transitionTimingFunction(easing.style);
this._transitionTime(time);
}
this._translate(x, y);
} else {
this._animate(x, y, time, easing.fn);
}
},

@osartun osartun linked a pull request Dec 18, 2017 that will close this issue
@osartun
Copy link
Author

osartun commented Dec 18, 2017

I created #1218 to solve that problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant