You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using centeredSlides, loop and slidesPerView={"auto"} simultaneously, the slider doesn't calculate the correct center of the slides. The pagination also jumps to the incorrect slide when clicked, and the mousewheel on MacOS jumps multiple slides during the same swipe.
I have read the documentation for loop, which doesn't state that loop doesn't work with auto. It states that:
Set to true to enable continuous loop mode
Because of nature of how the loop mode works (it will rearrange slides), total number of slides must be >= slidesPerView * 2
I have 9 slides in my slider, which should account for total number of slides being larger than slidesPerView * 2.
Expected Behavior
Slides should be centered
Pagination should go to correct slide
Mousewheel shouldn't jump two slides in a row
Actual Behavior
Slides position after changing slides is unpredictable
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-react-mousewheel-control-forked-kui36d?file=%2Fsrc%2FApp.jsx&selection=%5B%7B%22endColumn%22%3A1%2C%22endLineNumber%22%3A8%2C%22startColumn%22%3A1%2C%22startLineNumber%22%3A8%7D%5D
Bug description
When using
centeredSlides
,loop
andslidesPerView={"auto"}
simultaneously, the slider doesn't calculate the correct center of the slides. The pagination also jumps to the incorrect slide when clicked, and the mousewheel on MacOS jumps multiple slides during the same swipe.I have read the documentation for loop, which doesn't state that loop doesn't work with auto. It states that:
I have 9 slides in my slider, which should account for total number of slides being larger than slidesPerView * 2.
Expected Behavior
Actual Behavior
Swiper version
9.2.3
Platform/Target and Browser Versions
macOS Ventura 13.2.1 / Chrome 112.0.5615.49
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: