Page MenuHomePhabricator

Sortable, collapsible and collapsed tables with two-row headers hide the subheader row
Closed, DuplicatePublic

Description

When you create the following table (sortable, collapsible AND collapsed) using two-row headers, it hides the subheader row (Sortable 1-3).

{| class="wikitable sortable mw-collapsible mw-collapsed"
|-
! colspan="3" | Top header
|-
! Sortable 1
! Sortable 2
! Sortable 3
|-
| Cell 1
| Cell 2
| Cell 3
|}

If you remove the sortable class then the subheader row shows normally.

{| class="wikitable mw-collapsible mw-collapsed"
|-
! colspan="3" | Top header
|-
! Subheader 1
! Subheader 2
! Subheader 3
|-
| Cell 1
| Cell 2
| Cell 3
|}

It also works with the sortable class if you move the top header row visually outside the table box. But that's not what I would like to use.

{| class="wikitable sortable mw-collapsible mw-collapsed"
|+ colspan="3" | Top header
|-
! Sortable 1
! Sortable 2
! Sortable 3
|-
| Cell 1
| Cell 2
| Cell 3
|}

(Demo @ https://test.wikipedia.org/wiki/T247713)
Why doesn't the first table work correctly? Is that a MediaWiki bug?