kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.54k stars 5.89k forks source link

Slider isn't following the momentum after the touch ends #4073

Open ianthedev opened 3 years ago

ianthedev commented 3 years ago

short description of the bug / issue, provide more detail below.

This is an issue that is especially noticeable on mobile devices and is also especially noticeable when the slidesToShow is 1. During the touch move, the slider follows your swipe speed no matter how fast you swipe. But when the touch ends (finger leaves the screen), the slider's sliding speed changes to its own slow speed.

====================================================================

Steps to reproduce the problem

  1. Swipe the slider, the faster the better.

====================================================================

What is the expected behaviour?

When your finger leaves the screen, the slider's sliding speed is suppose to follow the momentum of your fast swipe.

====================================================================

What is observed behaviour?

When your finger leaves the screen, the slider's sliding speed changes to its own slow speed instead.

====================================================================

More Details

4ntz commented 1 year ago

Is there a workaround or constellation of settings which eliminates this behaviour? The speed setting seems to be the only one which makes any difference. So my solution for now is to set the speed to a fairly low number based on the breakpoint.

@ianthedev did you find another solution?

$('#slider').slick({
  ...
  speed: 2000,
  autoplaySpeed: 4000,
  responsive: [{
    breakpoint: 768,
    settings: {
      speed: 200
    }
  }]
});
ianthedev commented 1 year ago

@4ntz I didn't find another solution. But last year, I was involved in a project which was required to be jQuery-free, so I tried a different carousel plugin called Splide. Since then, I have been using that plugin. That plugin does not have the said issue. You could give it a try.

4ntz commented 1 year ago

@ianthedev i see – thanks for the tip!