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
I'm using the slider in a simple way with the default settings I configured. I'm monitoring the active slide with onSlideChange, and at first, it works well. The autoplay transitions through the images as expected, but the issue starts when it reaches the last slide. Since I'm logging the active slide, I can see that after it reaches the last one, even though it loops back to the first slide (due to the active loop), it keeps logging the index of the last slide every time.
Expected Behavior
Since I tested with 3 images, it should log sequentially as 0, 1, 2, 0, 1, 2, and so on.
Actual Behavior
It's logging 0, 1, 2, 2, 2, 2. The slider is correctly looping through the images, but the indices remain "stuck" on the last one.
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/devbox/swiper-7q3863
Bug description
I'm using the slider in a simple way with the default settings I configured. I'm monitoring the active slide with onSlideChange, and at first, it works well. The autoplay transitions through the images as expected, but the issue starts when it reaches the last slide. Since I'm logging the active slide, I can see that after it reaches the last one, even though it loops back to the first slide (due to the active loop), it keeps logging the index of the last slide every time.
Expected Behavior
Since I tested with 3 images, it should log sequentially as 0, 1, 2, 0, 1, 2, and so on.
Actual Behavior
It's logging 0, 1, 2, 2, 2, 2. The slider is correctly looping through the images, but the indices remain "stuck" on the last one.
Swiper version
11.1.15
Platform/Target and Browser Versions
Windows 11 - WSL
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: