Closed Bug 198705 Opened 21 years ago Closed 8 years ago

User specified background color not honored by SELECT form components when "Use my chosen colors" is enabled

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: spamluvr, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312

In a SELECT form component (a list of options), if a user has specified font 
and background colors and has selected "Use my chosen colors", the font color 
is honored but the background color is not for the displayed options. The 
background color is always white.

Reproducible: Always

Steps to Reproduce:
1. Go to Edit -> Preferences -> Appearance -> Colors
2. Choose a dark baground color and a light font color.
3. Enable "Use my chosen colors".
4. View this bug report, or any page with a SELECT component.
Actual Results:  
The options visible in SELECT components have a white background, regardless of 
user specified background color, however the user specified font color IS 
honored, resulting in almost nil contrast when using a dark background and a 
light font color.

Expected Results:  
User specified background color should be honored in all components.

SELECT components with a size attribute such that multiple options are always 
visible (a scrollable list) have a white background. SELECT components with no 
size attribute (pull-down menus) have the selected option with a white 
background and non-selected options with a gray background.
Attached image Screenshot
Screenshot of described behavior.
Reporter says this problem did not occur in 1.2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Suspect this is dependent on either bug 181490 or bug 224974.
Here is a sample code to clarify the problem in the latest Mozilla release
(compare with previous Mozilla versions, Netscape and IE to see that it works
properly).  Note that the first listbox demonstrates that the style works at an
item level but not at element level.  I hope this can be fixed ASAP.  Thank you.  

<HTML>
<TITLE>CSS Bug in Listbox</TITLE>
<HEAD>
<STYLE TYPE="text/css">
<!--
.sty00 { background-color: #1A5688; color: #A0A0A0; font-size: 9pt }
-->
</STYLE>
</HEAD>
<BODY>
<FORM NAME=frmObj METHOD=POST ACTION="">
   Style works at item level: 
          <SELECT style="width:100px" NAME="objSelI" SIZE=4>
              <OPTION VALUE=1>A</OPTION>
              <OPTION CLASS=sty00 VALUE=2>G</OPTION>
              <OPTION VALUE=3>D</OPTION>
          </SELECT>
<BR>
   Style does not work at form element level:
          <SELECT CLASS=sty00 style="width:100px" SIZE=4 NAME="objSelII">
              <OPTION VALUE=1>A</OPTION>
              <OPTION VALUE=2>G</OPTION>
              <OPTION VALUE=3>D</OPTION>
          </SELECT>
</FORM>
</BODY>
</HTML>
Re: comment 4

The problem you described is bug 224974.

BTW I can't reproduce this bug in current trunk build (1.7a, 20040129) on WinXP.
The problem I have found may be related or identical to this one. I have found that the css background color for Select is not honored in Camino. Other input fields (ie Input in the css) are. In my case the background color for the input fields is a dark blue (background color for the site) and the text is black, making it illegible. I can give you access to a page where you can see this, if required.
re comment #6, I suspect that behaviour (and maybe this whole bug) is related to bug 79107
Assignee: layout.form-controls → nobody
QA Contact: desale → layout.form-controls
This bug has been tagged for Regression and or Closure.
I find that Text and Background color are stable and matching my choices
Considering this I will close this as Resolved-WFM
Feel free to reopen if issue can be reproduced on a current build.
Please include any updated STR/FxVer/OS
Confirmed based on
Version 	46.0.1
Build ID 	20160502172042
User Agent 	Mozilla/5.0 (Windows NT 5.1; rv:46.0) Gecko/20100101 Firefox/46.0
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: