Open bonstio opened 5 months ago
v4.1.3
It's not possible to call scroll without invoking an animation.
No response
Make a call (e.g. from the JavaScript Console) to
splide.Components.Scroll.scroll(index, 0, true);
Since the duration param here is set to 0, there should NOT be a visible animation, yet there is.
The problem happens because of this line of code in Scroll.ts
duration = noDistance ? 0 : duration || max( abs( destination - from ) / BASE_VELOCITY, MIN_DURATION );
One fix is to explicitly check if duration has been defined:
duration = noDistance ? 0 : (duration === undefined ? max(abs(destination - from) / BASE_VELOCITY, MIN_DURATION) : duration);
No scroll animation
Checks
Version
v4.1.3
Description
It's not possible to call scroll without invoking an animation.
Reproduction Link
No response
Steps to Reproduce
Make a call (e.g. from the JavaScript Console) to
splide.Components.Scroll.scroll(index, 0, true);
Since the duration param here is set to 0, there should NOT be a visible animation, yet there is.
The problem happens because of this line of code in Scroll.ts
One fix is to explicitly check if duration has been defined:
Expected Behaviour
No scroll animation