#65763 closed defect (bug) (duplicate)
Administration: Responsive list tables: the toggle-row button escapes its row and overlaps the Help/Screen Options tabs
| Reported by: | khokansardar | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 7.1 |
| Severity: | major | Keywords: | has-patch needs-testing has-screenshots |
| Cc: | Focuses: | ui, accessibility, css |
Description
Introduced in [62838] / #32892, which moved scope="row" from the checkbox column to the primary column: the primary cell is now <th scope="row"> and the checkbox cell is now <td>. That commit updated many selectors additively, but two in the @media screen and (max-width: 782px) block in wp-admin/css/list-tables.css were missed.
Steps to reproduce
- Set the browser viewport to 782px or narrower.
- Go to Posts (
edit.php). Same on Pages, Comments, Users, Media list mode. - Observe the toggle-row chevron rendered in the top right of the page, overlapping the "Help" / "Screen Options" tabs.
- Click the Help tab.
Expected: Help panel opens.
Actual: A list table row expands instead, rendering its columns as a narrow strip of one-character-per-line text. The Help panel never opens — the button covers the tab and wins the hit test.
Cause
1. Primary cell has no positioning context
.toggle-row is position: absolute; right: 8px; top: 10px, but this rule still only matches td:
.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) { position: relative; clear: both; width: auto !important; }
The primary cell is now a th and stays position: static, so the button resolves against #wpbody (position: relative). Every row's button lands at the same place — measured top: 56, left: 734 on edit.php, while #screen-meta-links spans 530-772 x 46-86. elementFromPoint() over the Help tab returns BUTTON.toggle-row. The th also loses clear: both and width: auto !important.
2. Expanded rows do not stack
.wp-list-table .is-expanded td:not(.hidden) { display: block !important; }
This never matches the primary th, so on expand the th stays table-cell at 720px while the sibling tds become blocks squeezed into an anonymous cell - measured 8px wide each. It also now wrongly matches td.check-column (formerly a th, so formerly excluded), overriding the display: table-cell that [62838] added for it.
Affected
- Posts, Pages, all custom post types
- Comments
- Users
- Media (list mode)
- Application Passwords
- Any list table on the generic
WP_List_Table::single_row_columns()path
The Plugins and Network Themes screens are broken by the same th/td swap through a different rule, tracked separately.
Attachments (2)
Change History (5)
This ticket was mentioned in PR #12771 on WordPress/wordpress-develop by @khokansardar.
3 months ago
#1
#2
@
3 months ago
- Milestone 7.1
- Resolution → duplicate
- Status new → closed
Duplicate of #65743.
Duplicate of https://core.trac.wordpress.org/ticket/65743
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
[62838] / #32892 moved
scope="row"from the checkbox column to the primary column, so the primary cell is now<th scope="row">and the checkbox cell is now<td>. That changeset updated many selectors additively, but two in the@media screen and (max-width: 782px)block ofwp-admin/css/list-tables.cssstill only matchtd.1. The primary cell has no positioning context.
.toggle-rowisposition: absolute; right: 8px; top: 10px, but the rule supplying its containing block (… td:not(.check-column) { position: relative; … }) never matches the newth. The cell staysposition: static, so the button resolves against#wpbodyinstead. Every row's button lands in the same spot — measuredtop: 56, left: 734onedit.phpat 782px, while#screen-meta-linksspans530–772 × 46–86.elementFromPoint()over the Help tab returnsBUTTON.toggle-row, so the buttons cover the Help and Screen Options tabs and steal their clicks.2. Expanded rows do not stack.
.wp-list-table .is-expanded td:not(.hidden)never matches the primaryth, so on expand thethstaystable-cellat 720px while the siblingtds become blocks squeezed into an anonymous cell — 8px wide each, rendering Author / Categories / Date one character per line. That rule also now wrongly matchestd.check-column(formerly ath, so formerly excluded).### Changes
Two additive selector changes, following the approach [62838] states for itself — "styles are additive, to retain support for custom list table implementations":
th:not(.check-column)to the rule that establishes the positioning context, scoped totbody. The existingtdselector is only accidentally safe in the header, becausethead/tfootcontain exactly onetdand it is.check-column; header cells are allth, so an unscopedthselector would leakposition: relative,clear: bothandwidth: auto !importantintothead/tfoot, where the!importantwould silently override.wp-list-table thead th.column-primary { width: 100% }.thselector to the.is-expandedrule and exclude.check-columnfrom both halves, restoring the checkbox cell todisplay: table-cell. Without that exclusion the row collapses entirely: the checkbox becomes a block, the title drops to 60px and every remaining cell to 38px.No PHP, JS or RTL changes are needed —
list-tables-rtl.cssandlist-tables.min.cssare generated build artifacts.Affects Posts, Pages, all custom post types, Comments, Users, Media (list mode), Application Passwords, and anything on the generic
WP_List_Table::single_row_columns()path. The Plugins and Network Themes screens are broken by the sameth/tdswap through a different rule, tracked separately.### How to test
edit.php).Verified on all five screens at 782px, plus 480px and 783px;
thead/tfootprimarythunchanged; Quick Edit unaffected; and a row rewritten to the pre-[62838] shape (th.check-column+td.column-primary) behaves identically, so custom list tables still rendering the primary column as atdare unaffected.