-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte 5: Invalid namespace of elements within SVG #11993
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
I forgot to mention: Using I was able to get the element to show using a |
I can't reproduce this. The REPL works as expected: If I add Please state the steps to reproduce this. |
Oops. Sorry, you're totally right. I seem to have been confused 🙈 The issue happens when using a dynamic element ( Here is an updared reproduction: |
It's not possible for Svelte to know what namespace to assign to the dynamic element because it's inside a snippet and therefore could be rendered from anywhere. What you can do in these situations is add |
Great, thanks for the info! |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
In certain situations* the elements inside SVG elements appear to have an invalid namespace which means they are shown in the inspector (DOM tree) but are not actually visible.
*]
Such as using conditions and snippets in an svg element.Correction: When using a<svelte:element>
whosethis
property expression is defined inside a closure (f.x. inside a snippet as a@const
)A similiar issue seems to have popped up several times through the years: https://github.com/sveltejs/svelte/issues?q=is%3Aissue+is%3Aopen+namespace+svg
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAA-1XXW_bNhT9K4S6hwQQaZGiJVt1sm5ZMwzIiqHF9jINgyMrtgBZEiQmTmD4v-9cUlaaeOm6D9Qvg2Fbury8H-dc8UBb76Yo885Lft161Xyde4n3TdN4vmceGrrp7vLS5Ljv6ts2I8usy9qiMedpxVixburWsHd1u56XH-6W7Kat1yz1xGgwCRch9V6nVWr6Dd89IFeRvS3zdV6ZJxsPlj4OMBsNyXGzCs9dGvbhl-99VtWsaetrbExmI6zB47Gw0bAFvmxTmBVbuEwsd6mGTYfF7Xd35qHM6dIky7K-npcn3d3ylG3Jkpr61pRFlSdMNvesq8tiwdrl9fwk8O1HjE9fO8f1_J5vioVZwTXI19a6s8318QH3ul4UN0W-8BLT3uY7f2BnaOnTHKHq-3VZdWeptzKmSUajzWYjNqGo2-VIBUEwgkv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V_r8HRS1a-ZZ3tHbnYb1J1KJhDm1YF87JRTV3u_n9z-wBALHObtFphu8zy0Y56m3m127sBRA9QFUH0B9ToBDyf9t9weK7zAyfg8AAA==
Logs
No response
System Info
Severity
blocking an upgrade
Update
Fixed wrong error description and update reproduction REPL link
The text was updated successfully, but these errors were encountered: