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

fix(lazyPreloadPrevNext): lazyPreloadPrevNext not working with loop mode #6724 #6726

Conversation

rameauv
Copy link
Contributor

@rameauv rameauv commented Jun 4, 2023

Fixes #6724.

The lazyPreloadPrevNext was not working correctly if the loop mode was also enabled.

It also seems that in the part of code for the "rewind" mode, it wasn’t possible to preload slides with an index inferior than the active slide index. Which can happen if initialSlide > 0. It's also the case in the else part of the if(swiper.params.rewind) condition (src/shared/process-lazy-preloader.js l34), #6684, but I preferred to do a PR for only one issue at a time.

Shouldn’t we just remove that part (realIndex <= activeIndex || realIndex > slideIndexLastInView) and just preload the active slide/visible slides?

@nolimits4web nolimits4web merged commit 69acab4 into nolimits4web:master Jun 7, 2023
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

Successfully merging this pull request may close these issues.

lazyPreloadPrevNext not working with loop mode
2 participants