question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[svg] `foreignObject`'s contents are invisible

See original GitHub issue

I couldn’t figure out why but here is the example code: https://esnextb.in/?gist=8983fe352fb6664e7f13716af7a12744

the same svg code works in a plain html: https://jsfiddle.net/leaverou/qwg3r/

More infomation:

  • Adding attribute style="background-color: yellow" to <foreignObject /> has correct effect
  • Adding attribute style="background-color: yellow" to foreignObject’s children has no effect

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
developitcommented, Aug 20, 2016

Waiting on a couple more things in order to release this, but it looks like the fix works!

0reactions
developitcommented, Jan 24, 2018

it’s been fixed for a while!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVG foreignObject not showing on any browser, why?
I have a foreignObject in an SVG element. All other elements show, but the foreignObject is invisible along with its content.
Read more >
[svg] foreignObject 's contents are invisible #278 - GitHub
I couldn't figure out why but here is the example code: https://esnextb.in/?gist=8983fe352fb6664e7f13716af7a12744 the same svg code works in ...
Read more >
Div inside SVG foreignObject loses its position and not visible
I tried to run this HTML5 SVG code in MAC chrome (54.0.2840.98 (64-bit)); but the DIV inside the become invisible (or seems to...
Read more >
Html Inside Svg Foreignobject Not Visible - ADocLib
An author should make sure that the SVG document has a document order that mirrors the intended reading order for the content including...
Read more >
<foreignObject> - SVG: Scalable Vector Graphics
The <foreignObject> SVG element includes elements from a different XML namespace. In the context of a browser, it is most likely (X)HTML.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found