Firefox doesn't redraw blocks after changing :has(:target) state
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: siemenskun, Assigned: dshin)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 3 obsolete files)
Steps to reproduce:
- Open has-target-bug.html
- Click on links t1, t2, t3 in any order any number of times
Actual results:
Firefox doesn't redraw blocks after losing, and sometimes after getting :has(:target) on a block.
So there could be multiple blocks that are rendered as "targeted!" while this can't be true because they're siblings.
Sometimes after the page refresh all three elements shows "targeted!".
I've added :hover to make the issue clear. After forced redrawing caused by hovering over, all blocks are rendered correctly, and only the proper one shows " targeted".
Expected results:
After clicking "t1", the text content should look like this:
t1 targeted!
t2
t3
After clicking "t2", the text content should look like this:
t1
t2 targeted!
t3
After clicking "t3", the text content should be:
t1
t2
t3 targeted!
After refreshing the page, the text context should correspond to the anchor in the address bar.
It works in Chromium 107.0.5304.88 as expected.
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Updated•10 months ago
|
Assignee | ||
Comment 1•10 months ago
|
||
Assignee | ||
Comment 2•10 months ago
|
||
Depends on D200190
Assignee | ||
Comment 3•10 months ago
|
||
Depends on D200191
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Comment 4•10 months ago
|
||
Would generate invalid results :has()
selector if it's in the subject
compound but also uses a pseudo-selector (e.g. .foo:has(.bar)::after
).
Assignee | ||
Comment 5•10 months ago
|
||
Depends on D200222
Assignee | ||
Comment 6•10 months ago
|
||
Was added in bug 1793012. No longer needed since :has
is part of
reinvalidation selectors now. The new approach can be potentially-
pricey, but is a lot simpler.
Depends on D200223
Updated•10 months ago
|
Comment 9•9 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e0d1a0931b11
https://hg.mozilla.org/mozilla-central/rev/9032a37ea009
https://hg.mozilla.org/mozilla-central/rev/a30b42d227dd
Updated•9 months ago
|
Comment 12•9 months ago
|
||
Reproducible on a 2024-02-10 Nightly build on macOS 12.
Verified as fixed on Firefox 124.0b2 and Firefox Nightly 125.0a1 on macOS 12, Windows 10, Ubuntu 22.
Description
•