jsfiddle.net - "No results found." not displayed
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
People
(Reporter: railioaie, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webcompat-source:web-bugs])
Attachments
(2 files)
Environment:
Operating system: Mac OS X 10.15
Firefox version: Firefox 139.0
Preconditions:
Clean profile
Steps to reproduce:
- Navigate to: https://jsfiddle.net/c1pwfnj4/12/
- Observe
Expected Behavior:
"No results found " text is displayed
Actual Behavior:
"No results found " text is not displayed
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/160005
Original reporter here. A few extra notes:
This is cut down from (a non-public part of) my employer's website. We've deployed a workaround, so it's no longer a major issue for us. Safari's behavior matches that of Firefox - Chrome seems to be the outlier here.
Here's the relevant code:
<style>
.label {
position: relative;
}
.dropdown {
position: absolute;
overflow-y: scroll;
width: 100%;
}
</style>
<label class="label">
<div>
<input />
</div>
<div class="dropdown">No results found.</div>
</label>
The issue arises because .dropdown
has a calculated width of zero in Safari and Firefox, but the full width of the page (or container) in Chrome. Adding display: block
to the label, removing the div around the input, or removing either of the position
properties results in the correct rendering in all three browsers. Removing the overflow-y
or width
properties from .dropdown
cause the text to appear, but wrapped onto one word per line, as if it had a very narrow width.
Comment 3•2 months ago
|
||
This is technically a testcase, not a webcompat bug. Let's move this to the layout folks for triage.
Updated•2 months ago
|
Comment 4•2 months ago
|
||
Thanks for the bug report! I can reproduce this bug.
Comment 5•2 months ago
•
|
||
This looks like a long-standing position:absolute
bug in Firefox.
Description
•