Open Bug 217769 Opened 21 years ago Updated 3 months ago

[BC] border collapse borders not correct when empty row groups are involved

Categories

(Core :: Layout: Tables, defect)

defect

Tracking

()

People

(Reporter: urkle, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: testcase)

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030703
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030827

only the left pixel of the link is clickable..

Reproducible: Always

Steps to Reproduce:
Attached file Test case (obsolete) —
Here is the test case for the bug.
If an empty tbody is specified then the link in the tfooter is inaccesible
except for the left pixel, or however wide the first TH in the theader is.
Tested platforms
Tested under mozilla 1.4 (linux), 1.5b(linux), 1.4(windows), Firebird 0.6
(windows and linux).
Extra note..
HTML 4.01 spec does require that the tbody NOT be empty however.
So, the workaround for me is to rework my templates.
Attached file Test case (fixed)
Attachment #130610 - Attachment is obsolete: true
Depends on: 173277
Attached file Testcase #2
Bug 173277 probably explains why the link is not clickable, but the primary
concern here is that the colspan attribute does not work for <tfoot> when there
is an empty <tbody></tbody> group in a 'border-collapse: collapse' table.
Severity: minor → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attached file testcase
the problem has nothing to do with tfoot, just a empty row group is enough
changing title
Summary: Link not fully accessible in table. → border collapse colspan does not work after empty row group (cellmap?)
Attached patch patchSplinter Review
the patch addresses only the cellmap problem, the drawing of the collapsed
borders is still wrong
No longer depends on: 173277
Summary: border collapse colspan does not work after empty row group (cellmap?) → [fix] border collapse colspan does not work after empty row group (cellmap?)
taking for the fix
Assignee: table → bernd_mozilla
Attachment #130653 - Flags: superreview?(bz-vacation)
Attachment #130653 - Flags: review?(bz-vacation)
Comment on attachment 130653 [details] [diff] [review]
patch

r+sr=bzbarsky; looks reasonable.
Attachment #130653 - Flags: superreview?(bz-vacation)
Attachment #130653 - Flags: superreview+
Attachment #130653 - Flags: review?(bz-vacation)
Attachment #130653 - Flags: review+
*** Bug 219872 has been marked as a duplicate of this bug. ***
I fixed the cellmap issue, the border drawing is still not correct.
Assignee: bernd_mozilla → table
Summary: [fix] border collapse colspan does not work after empty row group (cellmap?) → border collapse borders not correct when empty row groups are involved
*** Bug 233135 has been marked as a duplicate of this bug. ***
Empty rowgroups are illegal HTML 4.01, I don't think we should care for them too
much. At most, it will be an enhancement, not a bug...
*** Bug 277109 has been marked as a duplicate of this bug. ***
Blocks: 276244
*** Bug 276244 has been marked as a duplicate of this bug. ***
*** Bug 302308 has been marked as a duplicate of this bug. ***
Hardware: x86 → All
Alias: [BC]
Alias: [BC]
Summary: border collapse borders not correct when empty row groups are involved → [BC] border collapse borders not correct when empty row groups are involved
Assignee: layout.tables → nobody
QA Contact: madhur → layout.tables
I had mentioned that the spec for HTML5 allows for empty TBODY elements on another bug report that has been marked duplicate of this one. I didn't want that change to go unacknowledged in this main bug report This should not be considered an enhancement request but a full fledged bug:

http://www.w3.org/TR/html5/the-tbody-element.html#the-tbody-element
this bug still alive...
FWIW people still hitting this bug (and being surprised about how long-lived it is) https://github.com/twbs/bootstrap/issues/27949

I just ran into this bug. Really suprised that it exists for 16 years now. Currently, I use this work-around: https://stackoverflow.com/questions/33168178/why-does-firefox-not-render-border-of-table-with-empty-tbody

I just ran into this bug as well. It cost me several hours to discover the cause.

This bug is still present in Firefox 91 (august 2021), even though HTML 5 allows empty tbody. The problem does not happen on Chromium. I've passed about 5 hours figuring the cause, so I believe It would be nice to solve it. Here is my sample code:

<!doctype html>
<html>
<head>
<meta charset = 'utf-8'>
<style type = "text/css">
table{
border: 1px solid black;
border-collapse:collapse;
}

		table td{
			border: 1px solid black;
		}
	</style>
</head>

<body>
	<table>
		<tbody>
			<tr><td>1</td><td>2</td></tr>
			<tr><td>3</td><td>4</td></tr>
		</tbody>

		<tbody>
		</tbody>
		
		<tbody>
			<tr><td>5</td><td>6</td></tr>
		</tbody>
	</table>


	<table>
		<tbody>
			<tr><td>1</td><td>2</td></tr>
			<tr><td>3</td><td>4</td></tr>
		</tbody>

		<tbody>
			<tr><td>5</td><td>6</td></tr>
		</tbody>
	</table>
</body>

</html>

Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 9 duplicates.
:dholbert, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dholbert)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(dholbert)

(In reply to Release mgmt bot (nomail) [:suhaib / :marco/ :calixte] from comment #30)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Yes it's still relevant. I'm using v106.0.1 and sadly, after 20 years this bug still exists. Workaround also still works around... tbody:empty{display:none;}

I've also had it for many years. Now I'm using v122.0.1. When I decided to take a closer look at it in my projects, I found out using search queries that it is caused by using the style
table { border-collapse: collapse; }

In my case
tbody:empty{display:none;}
does not help. I'm using
@-moz-document url-prefix() { table.table-bordered > tbody:after {
content:''
} }

Duplicate of this bug: 1023761
Blocks: 1230801
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: