Closed
Bug 209594
Opened 22 years ago
Closed 22 years ago
setAttribute("style", ..) has no effect, if used before addition of element to doc
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: BenB, Assigned: hyatt)
References
Details
Attachments
(1 file)
4.79 KB,
application/vnd.mozilla.xul+xml
|
Details |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030608
Reproduction:
1. JS dynamically manipulating the XUL DOM:
var radiogroup = document.createElement("radiogroup");
radiogroup.setAttribute("style", "display: -moz-grid-line;
-moz-box-orient: orizontal;");
document.getElementById("myparent").appendChild(radiogroup);
Actual result:
The style change has no effect
Expected result:
Same, as if the element was directly in the XUL file, including style attribute.
Additional comments:
Thanks to bz, the workaround is to do setAttribute("style", ...) *after*
appendChild(). This works.
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 3•22 years ago
|
||
Here is the (somewhat reduced) dialog I was trying to create.
With the bug, you see the radios all below each other. They should be arranged
in a grid, with "bookmarks", "server" and "local" all in one row, "cookies"
etc. in the next row.
I have marked the problematic code.
![]() |
||
Comment 4•22 years ago
|
||
Fixed by checkin for bug 209573
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•