Closed Bug 62367 Opened 25 years ago Closed 24 years ago

Setting the color (in JS) of a <TR> makes the table resize

Categories

(Core :: Layout: Tables, defect, P3)

x86
All
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: fstmaurice, Assigned: karnaze)

Details

Attachments

(3 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001122 BuildID: 2000112204 When I set the color attribute of a <TR> element within a <STYLE> tag, I do not get the color I specify (unrecognized). Furthermore, setting the color attribute dynamically with JS makes my whole table resize. Reproducible: Always Steps to Reproduce: 1. Create a style sheet with the TR element 2. Add the color property (ex: color : Red;) 3. Make an HTML table 4. On the onmouseover event of the <TR>, change the row's color to white. Actual Results: Nothing. The text in the row stays black as if it didn't recognize the color property of the <TR>. Also, the table resizes on the onmouseover event. See attachement. Expected Results: The text in the row should be red when loaded and white when onmouseover is executed. See attachement for actual results. The attachement behaves properly when loaded in IE5.
Sorry for the wrong line numbers in the attachement. Instead of reading "Lines 23, 24 and 25", it should of been "Lines 12 13 and 14".
I see this behavior on linux build 2000-12-05-08 as well. OS -> all. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows NT → All
As I tested this, I see only row 2 doing the wrong thing! Friendly, HJ.
Further pinpointed to this: Do you see any colors for the text? At least I don't with build 2000120804 on WinNT4 Sp6b. So by putting a return for 'objTR.style.color=colortext;', in there example, or taking it out, you have yourself an working example. Just take the test! So for now, narrowing it to this statement: objTR.style.color=colortext !! Friendly, HJ.
First of all,this one needs to go to DOM2. And it's not only by specifying a color for the <TR> element. Also the <TD> element has problems. This has to do with the lack of border. If you put a border of 2px around, no problem. Put 1px around, bingo! Take a look at H-J's BugWalker Version 0.2 at: http://members1.chello.nl/~j.c.drost/mozilla/bugwalker/startbw2.html Friendly, HJ.
Conclusion: For the resizing of the table I now have a workaround: objTR.style.background=color; objTR.style.color=colortext; objTR.style.border='0px'; <-- add this line to it!!!! By setting the colors for the cells with the use of <TD> element that also works. The only point now is that the <TR> elements seems to lack textcolor! And I might find a solution for that too! Hang on, till... Friendly, HJ.
About the comment on: 2000-12-10 18:01 I have found a solution for the shrinking of TR elements also. You might use cellpadding/cellspacing for that problem. Did tested is, and now, one of my bugs is solved, at least, there's a work around for it. Friendly, HJ. (No solution for the TR colors yet).
Sh*t that 'TR elements' should read TD, sorry for the spam. I'm going to fast for my old head it seems! Friendly, HJ.
Reporter, the summary is about "Setting the color (in JS) of a <TR> makes the table resize" but then, that resize problem is fixed. You can check that by running attachment 20357 [details]. Other bugs you might have found with this example, should be filed as a separate bug report. This bug should be marked fixed.
Or the summary has to be changed, in order to cover the bug. Are you going to change the summary to make sure that the setting of a color with JavaScript in a <TR> element does not work? Or can someone else doe that?
By browsing through the "nglayout project / gecko layout engine FAQ", I have found the following statement: "By the end of calendar year 2000, Gecko is expected to support the following recommended open Internet standards fully except for the areas noted below and open bugs documented in Bugzilla: Style Sheets CSS 1 - full support, except for: the application of styles to HTML column elements the ability to turn off author styles the names of certain Mozilla extension pseudo-classes lack the moz- prefix" http://www.mozilla.org/newlayout/faq.html#Which%20open%20standards This confirms that changing color of the cells is not supported in the Gecko engine. As for the table resizing, it is resolved in Mozilla 0.7 build. I suppose this bug can be closed. Note: For my curiosity, I'd like to know which bug # has resolved this issue...
This bug is now fixed. I didn't think it was my responsability to close it but since no one seems to want to do so, I'm closing it now.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA contact update
QA Contact: chrisd → amar
This was fixed long time back. Marking verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: