background-color not set correctly in sidebar <select> and <option> elements
Categories
(Firefox :: Theme, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: trittson, Assigned: emilio)
Details
Attachments
(3 files, 2 obsolete files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:87.0) Gecko/20100101 Firefox/87.0
Steps to reproduce:
- Create an add-on with a sidebar (you can use the annotate-page example to get set up quickly: https://github.com/mdn/webextensions-examples/tree/master/annotate-page)
- On the sidebar page, add a <select> item with a few <option> elements inside. Set background-color of <select> and <option> elements to an arbitrary color (e.g. black). Example codepen: https://codepen.io/eliykat/pen/bGgRgvm (note this codepen exhibits the expected behaviour because it is not in a sidebar)
- Click the <select> item to open the dropdown list
Actual results:
background-color is not set on the <option> elements and therefore defaults to white.
This occurs any time the <option> background-color is the same as the <select> background-color. Changing the <option> background-color even by 1 unit will exhibit the expected behaviour.
Expected results:
background-color on <option> elements should be set per the CSS styling, irrespective of the background-color on the parent <select> element. Codepen example shows the expected behaviour.
Expected behaviour also occurs in the add-on popup.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 2•3 years ago
|
||
Can you post an screenshot of what you see? I see a working <select>
here (on Linux though).
Comment 5•3 years ago
|
||
Could you also attach your example add-on showing the problem, so we can be sure we're looking at the same thing? Thanks.
I've attached a minimal add-on which shows the bug, plus a short recording to show you exactly what I'm seeing.
The add-on will open in the sidebar (exhibiting the bug) and in the browser-action popup window (exhibiting the expected behaviour). Per the CSS of the extension, the dropdown items should have white text on a black background. However, when we open the dropdown in the sidebar, the background defaults to white, making the text unreadable.
Assignee | ||
Comment 9•3 years ago
|
||
Thanks, yeah, that looks pretty bad, I'll try to take a look. I think this might be fixed on Nightly via some related fixes I made, if this is using the general select popup code.
Assignee | ||
Comment 10•3 years ago
|
||
So that the rules apply to the popup in
browser/base/content/webext-panels.xhtml and about:addons as well.
Updated•3 years ago
|
Assignee | ||
Comment 11•3 years ago
|
||
So I took a look (sorry for the lag, this doesn't repro on Linux so it took a bit more time) and this is a front-end issue. Will fix anyways.
Assignee | ||
Updated•3 years ago
|
Comment 12•3 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1a9cd609d14d Move content select dropdown rules from browser.css to global.css. r=Gijs
Comment 13•3 years ago
|
||
bugherder |
Reporter | ||
Comment 14•3 years ago
|
||
Hey Emilio, thanks for sorting this one out! That was a really quick turnaround for a pretty minor bug. Much appreciated.
Description
•