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

No scroll events fired when using keybindings #1217

@osartun

Description

@osartun

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);
}
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions