Skip to content
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

SVG render issues within #if blocks #14671

Closed
Kabakuro opened this issue Dec 11, 2024 · 3 comments · Fixed by #14685
Closed

SVG render issues within #if blocks #14671

Kabakuro opened this issue Dec 11, 2024 · 3 comments · Fixed by #14685
Assignees
Labels

Comments

@Kabakuro
Copy link

Describe the bug

Hey there, I'm currently migrating a project to svelte 5 (It's great so far).

One thing I noticed is that if you have SVG elements in an #if and regular HTML in an :else (or another #if), It won't render the SVG elements. It also errors in the example for using getBBox. I'm guessing this is a namespace issue with if/else blocks?

I understand that this works by using #snippet instead but surely this should just work?

Reproduction

https://svelte.dev/playground/dcb13ede27e9438ba6d2a40002ea36b6?version=5.10.1

Logs

No response

System Info

N/A (using the REPL)

Severity

annoyance

@trueadm
Copy link
Contributor

trueadm commented Dec 23, 2024

@bdpartridge Please create a separate issue, rather than commenting on a closed one.

@bdpartridge
Copy link

@trueadm Sorry about that. Created #14814.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants