-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte 5: contenteditable="true"
with bind:innerText
breaks the output of {@render children()}
#11653
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
Comments
May be related to this breaking change in the sense of "children render comes in too late, binding has already taken over". Probably reasonable to look into changing this so that at least the initial value still comes in. Would you expect updates to the content in the parent be reflected in the bound inner text in the child? Because that breaking change would change that. |
Yeah, but with |
@trueadm The output now works, but it is still incorrect ( ![]() You can check it out at the first link from the first post (Svelte 5 (runes) 🔴). |
This is a tricky one then. I viewed that as being fine. Svelte 5 has its own html output that differs from Svelte 4 and comments don’t affect layout. That anchor is valid too as Svelte uses them for runtime updates. So it needs to be there in case your snippet updates. We could strip it out of the innerHTML but that seems like a hack. |
@trueadm Revisited my own examples and saw a typo. It looks like there is no bug and you have done everything correctly. I apologize for wasting your time. ![]() There should be either |
Describe the bug
The same thing happens with
bind:innerHTML
/bind:textContent
.Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: