Skip to content

Slider goes from 1st slide directly to 3th slide instead of 2nd #848

@kapenzo

Description

@kapenzo

Checks

Version

v4.0.7

Description

In our configuration we want to show always 3 slides. The centered slide is the "selected" one.
The problem appears only when slider has 3 slides - slider is going directly from first to last slide after pressing the "next" button.

Splide configuration:
const splide = new Splide(".splide", {
trimSpace: false,
perPage: 3,
perMove: 1,
focus: "center"
}).mount();

Reproduction Link

https://codesandbox.io/s/elated-shadow-90s0jg

Steps to Reproduce

  1. Click the next (right arrow) button.
  2. The last element is selected.

Expected Behaviour

Expected is that after clicking next btn the slider will go to the second slide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions