keen-slider icon indicating copy to clipboard operation
keen-slider copied to clipboard

Slide rewinds back

Open ray-zero2 opened this issue 3 years ago • 4 comments

If we press the slide forward button repeatedly, it goes back.

sample: https://codesandbox.io/s/determined-glitter-b9rvzq

  1. we push next-button many times
  2. we resize window size (it doesn't matter)
  3. we press next-button repeatedly and stop when No.1 slide comes to the center.
  4. we press it again, it goes back when No.2 slide comes.

https://user-images.githubusercontent.com/42022035/183349078-6ddc8006-a2f8-4d3f-8ca3-aca24c6b80da.mov

ray-zero2 avatar Aug 08 '22 05:08 ray-zero2

I was able to reproduce the problem and am already working on a solution.

rcbyr avatar Aug 09 '22 07:08 rcbyr

Hey guys, I'm experiencing the same issue. I hope we can get a solution soon. Thank you very much!

pablojacosta avatar Oct 12 '22 15:10 pablojacosta

Any progress with this issue?

katwlodarczyk avatar Dec 07 '22 12:12 katwlodarczyk

I ran into the same issue, i made this plugin to work around the issue until resolved.

export const FixRewind = (slider) => {
  slider.on('animationEnded', (slider) => {
    const { rel, progress } = slider.track.details;
    if (rel === 0 && progress !== 0) {
      slider.moveToIdx(0, true, { duration: 0 });
    }
  });
};

chriz001 avatar Apr 18 '23 05:04 chriz001