:empty is not invalidated when ::before uses display: table
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox153 | --- | unaffected |
| firefox154 | --- | unaffected |
| firefox155 | + | fixed |
People
(Reporter: jamienk, Assigned: sukil)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:155.0) Gecko/20100101 Firefox/155.0
Steps to reproduce:
I have an empty contenteditable. It has CSS for :empty:
.editor:empty::before {
content: attr(data-placeholder);
}
.editor::before{
content: " ";
display: table; << this seems to trigger the issue
}
I type into it
Actual results:
Some of the CSS "content" seems to stay. If I toggle the display: value off/on in devtools it works normally
If "display" is not set to "table" it works as expected
See CodePen: https://codepen.io/Jdevel/pen/KwaxwWg
Video of CodePen fail: https://youtu.be/9irNkjaaCk4
Expected results:
When I type into the contenteditable field, it is no longer :empty so the .editor:empty::before css should stop
This is a recent regression (last few days as of July 22, 2026). Works correctly in FF release, Chrome, Safari, etc
See attached HTML which shows:
- :empty CSS applies, shows
content: attr(data-placeholder); - type some text
content: attr(data-placeholder);still applies even though not :empty- toggle some css off/on (I have JS button that does that) and it correctly shows
content: ''
Comment 1•1 day 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.
Comment 2•1 day ago
|
||
Regression window:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=8f90c8df2ed2f97eb00d2703d679cbce9d4cc778&tochange=f840e09e83acbdf58e3fff6f6e49a200c2a83927
Comment 3•1 day ago
|
||
:sukil, since you are the author of the regressor, bug 1986640, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 4•1 day ago
|
||
[Tracking Requested - why for this release]: This feature is riding the trains in 155 and we don't want to ship this regression.
Comment 5•1 day ago
|
||
Set release status flags based on info from the regressing bug 1986640
Updated•1 day ago
|
Comment 6•1 day ago
|
||
The bug is marked as tracked for firefox155 (nightly). However, the bug still isn't assigned and has low severity.
:fgriffith, could you please find an assignee and increase the severity for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Updated•1 day ago
|
| Assignee | ||
Comment 7•1 day ago
|
||
The table wrapper is the primary frame, but its child InnerTableFrame holds
the non-pseudo-element ComputedStyle, which our update in
HandlePrimaryFrameStyleChange() missed.
| Assignee | ||
Updated•1 day ago
|
Description
•