Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination, loop, centeredSlides, and slidesPerView - Not always loading prev and next slides #6451

Closed
5 of 6 tasks
Bimmr opened this issue Mar 2, 2023 · 8 comments
Closed
5 of 6 tasks

Comments

@Bimmr
Copy link

Bimmr commented Mar 2, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://jsfiddle.net/Bimmr/ta0zn215/3/

Bug description

  • If you use Pagination and to go to slide 4, it doesn't load the next image
  • If you use Pagination and to go to slide 5, it loops backwards and doesn't load the previous slide
  • If you use the navigation and click next to get to slide 6, then use pagination to go to slide 2 it doesn't load the previous slide

Expected Behavior

Load the previous and next slides to be seen with slidesPerView and centeredSlides. By changing loopedSlides to something like 3 it does start to perform differently but still doesn't always load the previous and next slides

Actual Behavior

It looks like it's not adding the previous slide or next slide for loop when jumping around slides.

Swiper version

9.1.0

Platform/Target and Browser Versions

Microsoft Edge Version 110.0.1587.57

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@Fausto-Payano-Axomic
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://jsfiddle.net/Bimmr/ta0zn215/3/

Bug description

  • If you use Pagination and to go to slide 4, it doesn't load the next image
  • If you use Pagination and to go to slide 5, it loops backwards and doesn't load the previous slide
  • If you use the navigation and click next to get to slide 6, then use pagination to go to slide 2 it doesn't load the previous slide

Expected Behavior

Load the previous and next slides to be seen with slidesPerView and centeredSlides. By changing loopedSlides to something like 3 it does start to perform differently but still doesn't always load the previous and next slides

Actual Behavior

It looks like it's not adding the previous slide or next slide for loop when jumping around slides.

Swiper version

9.1.0

Platform/Target and Browser Versions

Microsoft Edge Version 110.0.1587.57

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR

A member of my team experienced this bug earlier today. We can confirm that it is active in 9.1.0.

@sumshare
Copy link

+1, it works well at 8.4.4 but fail in 9.1.0

@shaunsama
Copy link

Add more slides, it works.

@msobkyy
Copy link

msobkyy commented Nov 21, 2023

still not working in 11.0.3

@Bimmr
Copy link
Author

Bimmr commented Nov 21, 2023

still not working in 11.0.3

They marked it fixed back in April, but never actually fixed it. I've since moved forward just not using it...

@hamzaejaz787
Copy link

I have the same issue

@marcincyboran
Copy link

Same...

@michaelbourne
Copy link
Contributor

michaelbourne commented Jul 24, 2024

Still an issue in 11.1.7.

loop combined with centeredSlides will leave a gap at the end of the slides (depending on the direction of travel) before rendering in the next slide.

https://jsfiddle.net/p3Lk91c8/4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants