Closed
Bug 106995
Opened 23 years ago
Closed 21 years ago
<iframe> background color not set via style change
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: kinger, Assigned: dbaron)
Details
Attachments
(1 file)
From conversation on n.p.m.xpfe -------- Eric says: I have to following code to change the background color of my iframe: function setBackground() { var e = window.frames[0].document.documentElement; e.childNodes[1].setAttribute("style", "background-color: #c5d2de;"); } and the following code to write into this iframe at different times: function setContentArea(spell) { with (window.frames[0].document) { open(); write('<FONT FACE="Helvetica, Times New Roman" STYLE="font-size: 10pt;">'); write(spell.description); write('</FONT>'); close(); } } The problem is that the background color gets set and stays after the first call to setContentArea, but after I call it again, the background goes to white. This seems to have shown up in 0.9.4. In 0.9.3 the background stays #c5d2de. -------- Brian says: I am seeing the same thing, except more exaggerated. It is flashing to teh set colour and then turning white again immediately. I'm using 0.9.5. -------- Eric continues: Dave Hyatt also said that I should file a bug, because it probably is a ruletree regression ...
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
Comment 1•22 years ago
|
||
--> default owner
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW
Target Milestone: mozilla1.0.1 → ---
Comment 2•22 years ago
|
||
this is a style system issue (although I'm not sure this is really a bug since the document.open is replacing the previous document).
Assignee: jaggernaut → dbaron
Component: XP Toolkit/Widgets → Style System
Assignee | ||
Comment 3•22 years ago
|
||
Do you have a testcase for this?
Comment 4•22 years ago
|
||
a particularly troublesome occurence at http://arstechnica.com/etc/subscribe/premier-agreement.html black text on transparent iframe on black background is ... black.
Comment 7•21 years ago
|
||
So... the code sets the background on the <body> in the iframe. Then it document.writes into it, blowing away the whole existing document, including the body. This is invalid; if you want to set a background on the iframe, just set it on the iframe.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•