Fix for lazy loading in free mode #4275
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If both lazy loading and free mode are enabled, lazy loading may not work in some circumstances.
Basically if you move to not loaded yet slides with a mouse and completely stop moving before releasing, slides are not loaded.
I recorded a video showing it: https://youtu.be/zvfhp20sccA.
At first I'm opening a tab with an example built using current master branch of Swiper.
Then I'm opening a tab with the version patched with this proposed change.
Here are examples:
The version from master branch: https://bcmk.github.io/swiper/master.html
Fixed version: https://bcmk.github.io/swiper/fixed.html
I haven't created test cases yet and I would be grateful if someone points me to the correct way to add them.
Corresponding issue: #4274
P.S. It fixes the behavior only for
loadOnTransitionStart: true
.The issue for
loadOnTransitionStart: false
still exists.