-
Notifications
You must be signed in to change notification settings - Fork 87
Styles aren't applied for root svg element #52
Copy link
Copy link
Open
Description
Tested in Firefox 63.0.3.
Settings styles this way in function onloadFunc won't work:
if (svg) {
svg.setAttribute("aria-hidden", "true");
svg.style.position = "absolute";
svg.style.width = 0;
svg.style.height = 0;
svg.style.overflow = "hidden";
body.insertBefore(svg, body.firstChild);
}
Function insertBefore drops the styles from the element so to apply styles for this element they have to be set after inserting the element in dom:
if (svg) {
svg.setAttribute("aria-hidden", "true");
var insertedSvg = body.insertBefore(svg, body.firstChild);
insertedSvg.style.position = "absolute";
insertedSvg.style.width = 0;
insertedSvg.style.height = 0;
insertedSvg.style.overflow = "hidden";
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels