has pseudo selector (caching?) issue when child includes focused input
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox120 | --- | unaffected |
firefox121 | --- | fixed |
firefox122 | --- | fixed |
People
(Reporter: krassowski.michal, Assigned: dshin)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
Steps to reproduce:
The :has() pseudo-class does not appear to be evaluated correctly when a focused input element is contained in the selected node.
To reproduce:
- Open the attached has.html file in Firefox 122.0a1 (2023-11-27) (64-bit)
- (Optional) double-check that
layout.css.has-selector.enabled
is true - Click "Run" button
- Wait 1 second
Actual results:
Inputs numbered 0-99 are all shown (bad). When you open developer tools to investigate inputs 0-98 get hidden leaving input 99 (good).
Expected results:
Only input 99 is shown after running and waiting 1 second.
Reporter | ||
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Comment 3•2 years ago
|
||
This works correctly in Chromium-based browsers.
Reporter | ||
Comment 4•2 years ago
|
||
It appears that a similar scenario with a simpler selector like:
.parent:has(.child) {
display: none;
}
works well in both Chromium and Firefox Nightly.
Comment 5•2 years ago
|
||
David, looks like a :has()
style invalidation bug, mind taking a look?
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Set release status flags based on info from the regressing bug 1853258
Comment 10•2 years ago
|
||
bugherder |
Comment 12•2 years ago
|
||
The patch landed in nightly and beta is affected.
:dshin, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox121
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 13•2 years ago
|
||
Comment on attachment 9366878 [details]
Bug 1867893: Do not skip invalidation for :has
if the stand-in element can be an anchor. r=emilio
Beta/Release Uplift Approval Request
- User impact if declined: Incorrect invalidation of some
:has()
selectors, as shown in Bug 1867893 comment 0. - Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky):
- String changes made/needed: N/A
- Is Android affected?: Yes
Comment 14•2 years ago
|
||
Comment on attachment 9366878 [details]
Bug 1867893: Do not skip invalidation for :has
if the stand-in element can be an anchor. r=emilio
Approved for 121.0b8.
Comment 15•2 years ago
|
||
uplift |
Updated•2 years ago
|
Description
•