Skip to content

[6.x] Fix table row hover sticking in Safari - #15638

Merged
jaygeorge merged 1 commit into
6.xfrom
15638-fix-safari-table-hover
Oct 13, 2026
Merged

jaygeorge merged 1 commit into
6.xfrom
15638-fix-safari-table-hover

Conversation

@jaygeorge

Copy link
Copy Markdown
Contributor

Description of the Problem

Closes #15632

In Safari, table rows in the CP stay highlighted after you've hovered over them, so moving down a listing leaves a trail of grey rows behind.

The :has(:hover) selector has been there since #12233 and hasn't changed in any v6 release, so this looks like a change in Safari 27 rather than something we broke.

What this PR Does

Swaps tr:has(:hover) td for tr:hover td. Safari doesn't always clear the :has(:hover) match when the pointer leaves the row. A row is already :hover whenever anything inside it is hovered, so this highlights exactly the same rows, and it's a cheaper selector too.

How to Reproduce

  1. In Safari, go to /cp/collections with a few collections
  2. Hover over one row, then the next, then another
  3. Before: the earlier rows stay highlighted. After: only the row under the pointer is highlighted

Use `tr:hover` instead of `tr:has(:hover)`. In Safari the flattened `:has(:hover)` selector from the production build doesn't clear when the pointer leaves, so rows stayed highlighted. Plain `:hover` covers the same rows and is cheaper.
@jaygeorge
jaygeorge enabled auto-merge (squash) October 13, 2026 14:08
@jaygeorge
jaygeorge merged commit dc830cf into 6.x Oct 13, 2026
65 checks passed
@jaygeorge
jaygeorge deleted the 15638-fix-safari-table-hover branch October 13, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hover state remains after hovering in Safari

1 participant