-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Slot fallback content shown when rehydrating #2354
Comments
I think it's because you have two <Box>
<h2>Hello!</h2>
<p>This is a box. It can contain anything.</p>
</Box>
<Box/> <--- This is a second Box without content in it, so it should show the fallback, right? |
Yes, you're right, I found that out when trying to find where the "bug" was introduced. |
I was able to reproduce the issue at https://github.com/btakita/svelte-slot-default-issue It's an issue when there is a Text DOM node around or within the slot during rehydration. No Text DOM node, no problem. See #2394 |
only create fallback content if no slot is provided
The example shows the bug: https://v3.svelte.technology/repl?version=3.0.0-beta.22&example=slot-fallbacks
edit:
So the issue is icw rehydration, where textcontent nodes in a slot are rendered before the content supplied through slot
I'm not sure how to reproduce this in a REPL env.
The text was updated successfully, but these errors were encountered: