Splidejs / splide

Splide is a lightweight, flexible and accessible slider/carousel written in TypeScript. No dependencies, no Lighthouse errors.
https://splidejs.com
MIT License
4.83k stars 418 forks source link

Slide does not loop naturally when using autoWidth option #1224

Open rikrank opened 1 year ago

rikrank commented 1 year ago

Checks

Version

V 4.1.4

Description

I am implementing a slider using autowidth mode and loop mode. When moving to the next slide after the last slide, the sliding behavior is momentarily choppy. Do you have a solution?

Reproduction Link

https://codepen.io/rikrank/pen/wvRorXY

Steps to Reproduce

https://codepen.io/rikrank/pen/wvRorXY

Expected Behaviour

l expect the slide to behave as it would slide naturally move as usual when last to first.

rikrank commented 1 year ago

To clarify the cause a bit, let me explain a few parts.

We believe this is the most likely cause. On the other hand, we would not be able to confirm such an event without taking steps to change the width of the element when active.

Is there any way to make it work correctly with variable width when is-active?