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
If you set centeredSlidesBounds to true on a Swiper element, and have a certain amount of slides combined with a particular slidesPerView number, the left-right swiping seems to invert and behave very unpredictably.
I have observed this behaviour with the following slide counts and slidePerView combinations:
5, 7
2, 3
5, 8
A possible workaround I've found is to set slidesPerView to a decimal value (e.g 3.1).
Expected Behavior
The Swiper wrapper starts at the left of its container, and doesn't attempt to centre the first slide.
Actual Behavior
The Swiper wrapper starts at the left sometimes, but swiping right to left causes the first slide to snap to the centre. Sometimes the wrapper will start centered on the first slide.
Check that this is really a bug
Reproduction link
https://codepen.io/evan_interdyn/pen/bGmQbVV
Bug description
If you set centeredSlidesBounds to true on a Swiper element, and have a certain amount of slides combined with a particular slidesPerView number, the left-right swiping seems to invert and behave very unpredictably.
I have observed this behaviour with the following slide counts and slidePerView combinations:
A possible workaround I've found is to set slidesPerView to a decimal value (e.g 3.1).
Expected Behavior
The Swiper wrapper starts at the left of its container, and doesn't attempt to centre the first slide.
Actual Behavior
The Swiper wrapper starts at the left sometimes, but swiping right to left causes the first slide to snap to the centre. Sometimes the wrapper will start centered on the first slide.
Swiper version
9.3.2
Platform/Target and Browser Versions
macOS Chrome 113.0.5672.92
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: