Closed Bug 267896 Opened 20 years ago Closed 20 years ago

incorrect table rows rendering

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 97506

People

(Reporter: DmiG, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

The example below causes empty space to be displayed in place of row, which
style.dispay has been set to 'none'.
If 'table-row' is used instead of 'block', everything rendered as it should.

Reproducible: Always
Steps to Reproduce:
<HTML>
<HEAD>
<TITLE>title</TITLE>
</HEAD>
<script type="text/javascript">
function visibilityToggle(id){
	var el = document.getElementById(id);

	if(el.style.display == 'block')
		el.style.display = 'none';
	else
		el.style.display = 'block';
}
</script>
<BODY>
<a href="javascript: visibilityToggle('therow')">click here</a>
<table border=1>
	<tr><th>Header 1<th>Header 2<th>Header 3
	<tr><td>Row 1 Cell 1<td>Row 1 Cell 2<td>Row 1 Cell 3
	<tr style="display: none" id=therow><td>Row 2 Cell 1<td>Row 2 Cell 2<td>Row 2
Cell 3
	<tr><td>Row 3 Cell 1<td>Row 3 Cell 2<td>Row 3 Cell 3
</table>
</BODY>
</HTML>
Attached file test example
Maybe dupe of Bug 175190? But wouldn't you first need to set cellpadding=0
cellspacing=0 border=0 for your table to get a correct testcase (also when it
might be a dupe)?
I think, this is not a dupe.

I didn't dig enough in CSS2 specs, but I think, that Gecko renders row with
display:block correctly.
Why IE does it different (the "right") way? Because of way it's support CSS2. It
doesn't support CSS2 specs for 'display' element (ie6 still doesn't).

The bug is that empty space left after changing TR style.display property to 'none'.
The testcase looks very similar to the one in bug 206516:
https://bugzilla.mozilla.org/attachment.cgi?id=147399&action=view
one should toggle between display:none and display:'' and bot block see my
comment in  bug 97506

*** This bug has been marked as a duplicate of 97506 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: