diff --git a/src/core/slide/slideToLoop.mjs b/src/core/slide/slideToLoop.mjs index 864ca3153..57ae2c6da 100644 --- a/src/core/slide/slideToLoop.mjs +++ b/src/core/slide/slideToLoop.mjs @@ -43,9 +43,14 @@ export default function slideToLoop(index = 0, speed, runCallbacks = true, inter } } let needLoopFix = cols - targetSlideIndex < slidesPerView; + if (centeredSlides) { needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2); } + if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) { + needLoopFix = false; + } + if (needLoopFix) { const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex