Skip to content

fix: avoid retaining detached links during preloading - #17488

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17487-weak-hover-anchor
Draft

svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17487-weak-hover-anchor

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • Hold hovered and last-preloaded anchors weakly so links removed without mouseleave cannot retain detached page or dialog subtrees.
  • Preserve #16325's reduced mouse-event traffic and 20 ms rest delay, and #15915's cache/navigation resets. Navigation-only cleanup was rejected because it misses in-place DOM removal.
  • Keep href and priority deduplication from #15191 and #13530, but snapshot SVG href strings: retaining SVGAnimatedString still retains its anchor even when the element reference is weak.
  • Cover HTML/SVG links with disabled, code, and data preloading, departed pages, and SVG href/priority transitions.

Fixes #17487

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 565bf04:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/565bf0406f3e0a045ff1823bba418d3502c009c8

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17488

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 565bf04

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

Last hovered link stays reachable after it's removed from the DOM (hovered_a in hover preload)

0 participants