Skip to content

Async SSR and client-side navigation causes elements to persist #14731

@teemingc

Description

@teemingc

Describe the bug

It seems like an async component that is SSR-ed causes all the elements below it to persist after client-side navigation. Not sure if this is an issue with Svelte or SvelteKit.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-yjjdovwo?file=src%2Froutes%2F%2Bpage.svelte

  1. Run npm run build && npm run preview
  2. Click on the navigation link to /about
  3. Observe that the paragraph from the home page persists in the new page

Logs

System Info

stackblitz

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions