nanohtml icon indicating copy to clipboard operation
nanohtml copied to clipboard

Svgs elements not created properly

Open isabellachen opened this issue 4 years ago • 2 comments

If an svg element has multiple path tags inside, only the first path is added to the nano element.

If I have an svg element like this:

<svg>
  <title></title>
  <path></path>
  <path></path>
</svg>

When the element is rendered in the dom, I get this:

<svg>
  <title></title>
  <path></path>
</svg>
<path></path>

I did a comparison in codesandbox with creating a regular element with document.createElement and with nanohtml.

isabellachen avatar Aug 09 '19 08:08 isabellachen

Thanks for the report! This is a hyperx bug, probably the same as https://github.com/choojs/hyperx/issues/34 or https://github.com/choojs/hyperx/issues/41. Hard to say how hard the fix would be.

goto-bus-stop avatar Aug 12 '19 10:08 goto-bus-stop

After some investigation, the issue that is causing this problem is https://github.com/choojs/hyperx/issues/41 I've added details in that issue about exactly what is happening, and a possible solution we might apply.

mreinstein avatar Feb 06 '21 19:02 mreinstein