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
Imagine a sub page of a website where there is a link to let's say /, both at the very start as well as in the footer of the document. preloadVisibleLinks will never preload the first element on the page, even though it's in the viewport. The reason for that is that the the link to / in the footer is not in the viewport and thus will immediately remove the link again, just after it was added for the first link.
Workaround
Providing a data-swup-preload attribute manually.
Possible Solution
Haven't thought about a solution, yet 😄 ...but we definitely need one.
The text was updated successfully, but these errors were encountered:
Interesting. I'd have hoped the intersection observer fires only when the visibility state actually changes, not initially. Admittedly, that part is very much inspired by quicklink and seems to have the same problem with duplicate links.
Description of the issue
Imagine a sub page of a website where there is a link to let's say
/
, both at the very start as well as in the footer of the document.preloadVisibleLinks
will never preload the first element on the page, even though it's in the viewport. The reason for that is that the the link to/
in the footer is not in the viewport and thus will immediatelyremove
the link again, just after it was added for the first link.Workaround
Providing a
data-swup-preload
attribute manually.Possible Solution
Haven't thought about a solution, yet 😄 ...but we definitely need one.
The text was updated successfully, but these errors were encountered: