-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{@html}
broken after hydration since Svelte 4.0.2
#7557
Comments
This should be reported to Svelte. Looks like an unintended breaking change. I tried debugging this but I can't quite figure out why it's happening. I noticed the A difference in your repro with a non-wrapper and wrapper islands, is that we're creating the Svelte component with astro/packages/integrations/svelte/client.js Lines 11 to 20 in 7419bb6
Closing for now as it's not something that can be fixed in Astro. |
The problem is that the resulting HTML is invalid. In the reproduction, the result is |
Ah, you're right, it seems to always happen with nested |
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with withastro/astro#7557
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with withastro/astro#7557
I was just setting up a repo to reproduce it in SvelteKit but it looks like it already got fixed :P |
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with withastro/astro#7557
What version of
astro
are you using?2.7.3
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
pnpm
What operating system are you using?
Linux (NixOS)
What browser are you using?
Firefox (Librewolf)
Describe the Bug
Since Svelte 4.0.2, the
{@html}
tag seems to be broken after being hydrated from props. On page load, it appears for a moment, but quickly disappears after hydration.I think that this may originate from sveltejs/svelte#8880.
What's the expected result?
The
{@html}
tag should not disappear after being hydrated from props. This is its behavior in Svelte 4.0.1 and earlier.Link to Minimal Reproducible Example
https://gitlab.com/wackbyte/svelte-html-hydration-broken
Participation
The text was updated successfully, but these errors were encountered: