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.93k stars 427 forks source link

Glitch in loop autoscroll #1333

Open dr-ananthakrishna opened 2 months ago

dr-ananthakrishna commented 2 months ago

Checks

Version

v4.1.4

Description

Hi, When I use auto scroll with loop there is a glitch kind of jerky movement at the end of list. I have attached recoding with 6 items, as you can see at the end of list as 1 comes up to the middle there is a jerky movement. Please help

Reproduction Link

No response

Steps to Reproduce


const elements = document.getElementsByClassName('splide');

        for (let i = 0; i < elements.length; i++) {
          const slider = new Splide(elements[i], {
            arrows: false,
            pagination: false,
            scroll: false,
            drag: false,
            type: 'loop',
            autoScroll: {
              speed: 2,
              pauseOnHover: false
            },
            focus  : 'center',
            perPage: 3,
          });

          sliderInstances.push(slider);

          slider.mount(window.splide.Extensions);
        }
      }

### Expected Behaviour

Scroll should be smooth
OZORDI commented 2 weeks ago

Bump this. Im also experiencing this issue. Will share my splide config soon