<select> list with more <option> elements than list size not scrollable anymore
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr68 | --- | unaffected |
| firefox-esr78 | --- | unaffected |
| firefox78 | --- | unaffected |
| firefox79 | --- | unaffected |
| firefox80 | --- | unaffected |
| firefox81 | --- | fixed |
People
(Reporter: aryx, Assigned: MatsPalmgren_bugz)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
2.09 KB,
patch
|
Details | Diff | Splinter Review |
Firefox Nightly 81.0a1 20200802093514 on Windows 8.1
<select> lists with more <option> elements than list size are not scrollable anymore
Example: 'Product' list at https://bugzilla.mozilla.org/query.cgi?format=advanced
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
FYI, only mouse-scrolling is broken - scrolling using the keyboard works fine...
| Assignee | ||
Comment 3•5 years ago
•
|
||
So, the issue seems to be that ScrollFrameHelper::WantAsyncScroll() depends on the style NOT being hidden to be "scrollable":
https://searchfox.org/mozilla-central/rev/72a1334982cadde0ca8b3d3583877afea80f5639/layout/generic/nsGfxScrollFrame.cpp#1477-1480
GetScrollStylesFromFrame() used to return the unmodified CSS style, but now (bug 1531609) we map it to auto/hidden/scroll:
https://searchfox.org/mozilla-central/rev/72a1334982cadde0ca8b3d3583877afea80f5639/layout/generic/nsGfxScrollFrame.cpp#4318-4319
and <select> has overflow:clip:
https://searchfox.org/mozilla-central/rev/72a1334982cadde0ca8b3d3583877afea80f5639/layout/style/res/forms.css#231
which maps to hidden:
https://searchfox.org/mozilla-central/rev/72a1334982cadde0ca8b3d3583877afea80f5639/layout/base/ScrollStyles.cpp#20-21
I can't say I really understand the logic behind treating hidden has "unscrollable" in ScrollFrameHelper::WantAsyncScroll() - why does it do that? (hidden is scrollable (by script) per the CSS spec and always has been...)
It makes no sense to me that GetScrollStylesFromFrame() should return anything but auto/hidden/scroll given that this is a scroll frame!
Comment 4•5 years ago
•
|
||
While overflow: hidden is scrollable, it's not scrollable by the user... It seems also wrong to show scrollbars for something with overflow: clip. Maybe we should have overflow: auto in the listbox rules in forms.css?
| Assignee | ||
Comment 5•5 years ago
|
||
Yes, I clarified my comment above. What seems odd to me that ScrollFrameHelper::WantAsyncScroll would check the style at all since if you have a scroll frame it can be scrolled in one way or another... But I guess its real semantics is "CanBeScrolledByUser" or something like that...
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 6•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2b18f00410564714640de5cf7155968b1dd649ed
That broke css/css-flexbox/select-element-zero-height-002.html.
Presumably clip is excluded from the logic that makes is shrinkable to zero size with auto/hidden/scroll.
Also, the test I added pass locally but apparently synthesizeWheel is unreliable...
On Android, it appears comboboxes depends on overflow:clip to clip away the down-arrow for appearance:none, otherwise it creates overflow.
Yikes, what a mess...
Comment 7•5 years ago
|
||
I'd add the overflow: auto to this rule instead, probably. That's where we create a scrollframe unconditionally isn't it? Comboboxes otherwise are blocks.
| Assignee | ||
Comment 8•5 years ago
|
||
| Assignee | ||
Comment 9•5 years ago
|
||
Here's my attempt at writing a mochitest for this, for posterity...
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Updated•5 years ago
|
Description
•