-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
unexpected behavior using unwrapped html expression as component output #2711
Comments
Hi @CreaturesInUnitards! Very interesting. It happens if the HTML string is in the topmost component as well. If you as an experiment remove the each block key and change the ordering, the HTML isn't duplicated. |
Here is a minimal example that shows the same problem: https://svelte.dev/repl/8d71f3064391458aae9f917c3b693888?version=3. The problem seems to be related to the keyed each, because non-keyed each makes the problem go away. |
Have been trying to figure out what causes this. Think that the code for the indexed each will not call the One way to solve this might be to call the detach logic when the node is mounted. However this logic must be called before the |
Maybe it is a pragmatic idea to make it a syntax error to have an |
I haven't touched Svelte code so far … but in Vanilla JS, you could use a DocumentFragment for it, I guess. |
Adding arbitrary html to a |
correctly set mount anchor for HTML tags
https://svelte.dev/repl/98745830909e4c88979965fe00a8ba3a?version=3.2.1
Repro Steps:
Repros in Chrome, FF, Safari. Svelte 3.2.1
Doesn't repro if the html expression is wrapped in an html tag by itself
The text was updated successfully, but these errors were encountered: