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
With lazyPreloadPrevNext: 1 we expect to preload slide N+1 when N is loaded. However, this is not true for N=1. Then second slide is loaded immediately, even when the first is delayed.
Expected Behavior
In the codesandbox demo nature-1.jpg is not loaded on page load since it's not visibe. nature-2.jpg is expected to be pre-loaded only after nature-1.jpg is actually loaded.
Actual Behavior
nature-2.jpg is loaded on page load, before nature-1.jpg, which is only loaded later when the page scrolls.
This discussion was converted from issue #7334 on March 19, 2024 06:49.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-lazy-load-images-forked-73s2c5?file=%2Findex.html%3A150%2C22&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522vertical%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clt0idcqt002m2868hutsx7gb%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clt0idcqt002n2868esz0jd8j%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clt0idcqt002m2868hutsx7gb%2522%253A%257B%2522id%2522%253A%2522clt0idcqt002m2868hutsx7gb%2522%252C%2522tabs%2522%253A%255B%255D%257D%252C%2522clt0idcqt002n2868esz0jd8j%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clt0i5mqo00052868i5ay33k0%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522id%2522%253A%2522clt0idcqt002n2868esz0jd8j%2522%252C%2522activeTabId%2522%253A%2522clt0i5mqo00052868i5ay33k0%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Afalse%252C%2522sidebarPanelSize%2522%253A15%257D
Bug description
With
lazyPreloadPrevNext: 1
we expect to preload slideN+1
whenN
is loaded. However, this is not true forN=1
. Then second slide is loaded immediately, even when the first is delayed.Expected Behavior
In the codesandbox demo nature-1.jpg is not loaded on page load since it's not visibe. nature-2.jpg is expected to be pre-loaded only after nature-1.jpg is actually loaded.
Actual Behavior
nature-2.jpg is loaded on page load, before nature-1.jpg, which is only loaded later when the page scrolls.
Swiper version
v11.0.6
Platform/Target and Browser Versions
Firefox 22.0.1 on Linux
Validations
Would you like to open a PR for this bug?
Beta Was this translation helpful? Give feedback.
All reactions