Table inside SVG foreignObject breaks outer table context
Categories
(Core :: DOM: HTML Parser, defect, P2)
Tracking
()
People
(Reporter: davmillar, Assigned: hsivonen)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36
Steps to reproduce:
- Created an HTML page with a table. In the first TD is an SVG, the second TD has other content.
- Added the foreignObject tag to the SVG to implant HTML form components.
- Added a table inside the foreignObject tab to arrange the form components.
JSFiddle here: https://jsfiddle.net/davmillar/o3cyvaqj/
Actual results:
The second TD's contents do not appear inside the TD tag as expect, but just floating within the table. Looking at the source, the opening TD tag for the second TD is seen as 'unexpected' and disregarded.
Expected results:
The table context of the parent table should have been continued as normal and the second TD contents should be in their table cell.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
Minimized: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/7026
Notably, this supposedly permitted tag omission doesn't give the same result: https://software.hixie.ch/utilities/js/live-dom-viewer/saved/7027
Updated•6 years ago
|
Updated•3 years ago
|
Comment 2•7 days ago
|
||
Hello. I appear to have encountered this issue indepedently, minimized to this codepen with original report.
We maintain a generator from LaTeX to HTML, including tabular and diagram content. In that setting, a "table - inside SVG - inside table" appeared naturally. Today's Chrome appears to render that naturally, but Gecko seems to rewrite the DOM to a different structure.
Thank you for any support - this kind of content arises naturally in scholarly documents so it would be helpful to have it interoperable on the web.
Description
•