Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): fix initial slide index shift with centeredSlides and slid…
…esPerView auto (#7319) - Originally observed issue when initialSlide was 0 but reproduced in other cases - Investigation found activeColIndexWithShift calculation in loopFix.mjs was adding 0.5 when centeredSlides true, causing slidesPrepended to be decimal number in some cases - Non-integer slidesPrepended value then gets rounded down in snapIndex calculation in slideTo.mjs, causing initial slide index to be less than intended - Fix by using Math.ceil to round up the slide index variable passed to the slideTo method as argument in loopFix.mjs, ensuring an integer index value is passed to slideTo
- Loading branch information