-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[fix] hydration append issue #6602
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
Conversation
Why is there a change for how |
In issue #6463, |
src/runtime/internal/dom.ts
Outdated
} | ||
return result; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have multiple <svelte:head>
elements, wouldn't this be selecting {@html}
elements from another <svelte:head>
element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine it would, yeah. This would also be addressed if the HtmlTag
class (or, I guess, the HtmlTagHydration
class) were responsible for inserting this attribute on the top level elements - since each component would only be removing elements matching its unique scoping class name.
Could you update this to only include the fix for #6561 please? This seems like a more serious regression, and is something with a less controversial fix. We can take a look at the fix for #6463 (which appears to be a much longer-standing bug) in another PR, perhaps by updating how the elements are created in SSR. rather than how they are claimed. |
Thank you! I will cut a new release with this shortly. |
Thank you for the feedback! |
(Hopefully) Fixes #6561 (issue with keyed each block)
and fixes 6463 (hydration duplicates elements inhead
)Fix for issue #6561 is in the
append_hydration
function where an append operation was omitted in a case wherenode.parentNode === target
butnode.nextSibling !== null
. The corresponding test isruntime/samples/key-block-post-hydrate
.Fix for issue #6463 is based on the comment #6463 (comment). The corresponding test ishydration/samples/head-html
.