Skip to content

HTML using Declarative Shadow DOM breaks when using <ClientRouter> #14340

@delucis

Description

@delucis

Astro Info

Astro                    v5.13.7
Node                     v20.19.1
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

Tested in Firefox, Safari, and Edge. Seems to be a cross-browser issue.

Describe the Bug

When navigating using the <ClientRouter>, elements using Declarative Shadow DOM via the shadowrootmode attribute on <template> elements, are not rendered.

What's the expected result?

These elements should render the same as they do on an initial page load.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vetbxtrq?file=src%2FComponent.astro,src%2Fpages%2Findex.astro,src%2FLayout.astro,src%2Fpages%2Ftwo.astro&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: has workaroundAn edge case that only affects very specific usage, but has a trivial workaround (priority)feat: view transitionsRelated to the View Transitions feature (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions