Closed
Bug 502865
Opened 16 years ago
Closed 16 years ago
If I use javascript to change style.display property of table TR, table is drawn incorrectly
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dcviana, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; pt-BR; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; pt-BR; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
I have a table with four lines (TR) and the first line have a SELECT field. When the user changes the selected option of the SELECT field a javascript function is called.
This function changes the style.display property of the other three lines between "block" (or inline, I tested both) and "none". If I change the selected option to hide and then show again the lines, the table is incorrectly draw after the lines are shown.
Reproducible: Always
Steps to Reproduce:
1.In javascript, grab a reference to a TR field using getElementById
2.Assuming the reference variable is called "ref", call ref.style.display="none"
3.Now call ref.style.display="block" or ref.style.display="inline"
Actual Results:
The table is drawn incorrectly, if misaligned cells.
Expected Results:
The table should be drawn with all the cells aligned.
Attached is a small HTML file that can be used to test the problem.
Comment 2•16 years ago
|
||
If you want to return to display: table-row you should say so.
http://www.w3.org/TR/CSS21/visuren.html#display-prop
=> Invalid ?
Sorry then. I though it was an error because in IE it works and in the past (IE 6 and bellow) display:table-row didn't work in IE. I'll try it now to see if it will work in both Firefox and IE8.
![]() |
||
Comment 4•16 years ago
|
||
Yeah, the rendering looks correct given the markup. I suggest setting display="" to reset to default value instead of trying to guess what the default value is; this should work in all versions of all browsers.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•