Skip to content

Allow SVG elements in LiveComponent #269

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

Merged
merged 1 commit into from
Feb 4, 2022
Merged

Conversation

norkunas
Copy link
Contributor

@norkunas norkunas commented Feb 4, 2022

Q A
Bug fix? yes
New feature? no
Tickets N/A
License MIT

When the component contains svg elements then it throws error on rerender:

Uncaught (in promise) Error: Could not clone element
    at cloneHTMLElement (live_controller.js:977:15)
    at onBeforeElUpdated (live_controller.js:1331:46)
    at morphEl (live_controller.js:492:21)
    at morphChildren (live_controller.js:605:33)
    at morphEl (live_controller.js:507:15)
    at morphChildren (live_controller.js:605:33)
    at morphEl (live_controller.js:507:15)
    at morphChildren (live_controller.js:605:33)
    at morphEl (live_controller.js:507:15)
    at morphdom (live_controller.js:722:13)

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! Kind of a pain that we need to deal with the union type. As best I can tell, DOM nodes will be either HTMLElement or SVGElement: I think there aren't more types we're missing.

@norkunas
Copy link
Contributor Author

norkunas commented Feb 4, 2022

Updated

@weaverryan
Copy link
Member

Thank you @norkunas!

@weaverryan weaverryan merged commit 609f23b into symfony:2.x Feb 4, 2022
@norkunas norkunas deleted the svg-cloning branch February 4, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants