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

looped center slider and "click to move" jumps to wrong slide

Open m1ga opened this issue 1 year ago • 0 comments

Hi,

in my setup I use a looped centered slider with a "click to move" method. https://codepen.io/pter_st/pen/xxyaWyg I scale the item in the middle and left some boilerplate code in other events (I start videos and more, but I left out that code)

It works most of the time but sometimes when you go back and forward it will jump to the wrong slide: not the clicked slide but the "duplicate" slide before that; the direction is the wrong way.

Since it doesn't happen all the time I've did a screenrecording and recorded the issue:

https://github.com/rcbyr/keen-slider/assets/4334997/18c29ef9-1384-4e5f-bbc4-c7e370e3cf92

At 6sec you can already see that the scaling of the number is wrong: it should be big but it goes small and then when I click on "2" it will move in the wrong direction. The next numbers work fine again until I hit "1" again (again: scaling issue + "2" is moving in the wrong direction). Then I went backwards and forward again and it works.

Any hints on how to fix this one?

m1ga avatar May 16 '23 17:05 m1ga