:has selector - Invalidation does not affect pseudoelement generation
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
People
(Reporter: dshin, Assigned: dshin)
References
Details
Attachments
(2 files)
(Based on issue mentioned here)
STR: Run attached test case
Expected: "Hi" should dis/appear every second
Actual: "Hi" never appears
Assignee | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Just in case: I did play a bit with the minimal case, and found out that the minimal workaround could be to have a selector that matches the same element with the same :has()
but without the pseudo: just by having it, the other selector with the pseudo starts to work: https://codepen.io/kizu/pen/wvNwWGo
Also, was a bit tricky to debug on CodePen, as it seems that sometimes (not always?) editing the styles pane did trigger something, making the case with the pseudo-element to work.
Assignee | ||
Comment 2•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
(In reply to Roman Komarov from comment #1)
Just in case: I did play a bit with the minimal case, and found out that the minimal workaround could be to have a selector that matches the same element with the same
:has()
but without the pseudo: just by having it, the other selector with the pseudo starts to work: https://codepen.io/kizu/pen/wvNwWGo
Also, was a bit tricky to debug on CodePen, as it seems that sometimes (not always?) editing the styles pane did trigger something, making the case with the pseudo-element to work.
(A bit late, but...)
Yeah, if any other selector happens to trigger invalidation on the right element (i.e. the "parent" of the pseudoelement), it look as if it works correctly, but the underlying problem is not being able to invalidate on its own.
From the author's perspective, I agree that it just seems inconsistent and frustrating. At least the silver lining is that this in and of itself tends to be a telltale sign of this type of bug.
Comment 6•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Reproduced on an affected Nightly build from 2023-10-19, on Win 11.
Verified as fixed on Firefox 121.0b3 (20231124091512) and 122.0a1 (20231126211752)on Win 10, Ubuntu 22 and macOS 11.
Description
•