When using inline SVG in a .marko file the <title> tag of the svg seems to be rendered in the browser as the html <title> tag, so it does not show tooltips in the browser.
<svg viewBox="0 0 512 384">
<g>
<title>This is a tool tip</title>
<path d="M 10 10 L 10 364 L 492 364 L 492 10 Z"/>
</g>
</svg>
Marko Version: 4.15.2
Details
When using inline SVG in a .marko file the
<title>
tag of the svg seems to be rendered in the browser as the html<title>
tag, so it does not show tooltips in the browser.When I copy the generated html and paste it in a usual html file everything works fine. https://jsfiddle.net/jp4gz8dm/
I also tried adding xml-namespace
but the namespaces are only passed to the html (innerHTML ?) what the browser cannot interpret
Expected Behavior
When hovering the svg-path, the tooltip is shown.
Actual Behavior
The browser handles the
Possible Fix
Either: detect that the
<title>
tag is inside the<svg>
tag and adjust the namespace accordingly Or: add some support for assigningYour Environment
Steps to Reproduce
To reproduce you can copy the code above and paste it here: https://markojs.com/try-online/ Pure HTML version can be seen here: https://jsfiddle.net/jp4gz8dm/
Hover the black area, a tooltip should appear.
inspect the HTML elements to see the differences
Stack Trace
not relevant
Related
this is probably related to #1098