Closed Bug 872071 Opened 11 years ago Closed 10 years ago

Disabled input text field not changing background color

Categories

(Core :: CSS Parsing and Computation, defect)

All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 451771

People

(Reporter: wayne.westmoreland, Unassigned)

References

()

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Build ID: 20130511120803

Steps to reproduce:

Using Windows 7 SP1 and Firefox 21.0, I viewed the following HTML file

<input type="text" value="hello">
<input type="text" value="hello" disabled="">


Actual results:

The background-color of the disabled input field was the same as the first field.  It was white instead of dimmed/gray




Expected results:

The background-color of the text input element should have been rendered as "threedface" or #F0F0F0.  The same HTML rendered correctly using Firefox 21.0 on a Windows XP system.  Also the background colors between the enabled and disabled fields were different when using Chrome Version 26.0.1410.64 m and IE 10.0.4.
WFM with FF21 on Win 7: http://i.imgur.com/8EbXdtv.png

Could you try with a fresh profile, please:
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(wayne.westmoreland)
Your screen shot (http://i.imgur.com/8EbXdtv.png) shows exactly the problem I am having.  See how the background color is the same between the two fields?  If you examine the styles for those two fields you see that the background-color for the enabled field is supposed to be #FFFFFF and that field is rendered correctly with that background color. However the disabled field's background-color is supposed to be #F0F0F0 but instead it is also rendered as #FFFFFF.

BTW, I tried using a fresh profile, the behavior was the same.

Unless I'm mistaken the background-color for the disabled field is being set (but incorrectly rendered by FF) in the following style entry in forms.css:

input:disabled, textarea:disabled, option:disabled, optgroup:disabled, select:disabled:disabled {
    -moz-user-focus: ignore;
    -moz-user-input: disabled;
    background-color: threedface;
    color: graytext;
    cursor: inherit;
}
Flags: needinfo?(wayne.westmoreland)
Works for me with firefox-20.0b7.es-ES.linux64 and 22.0 Beta.
(In reply to Aleksej [:Aleksej] from comment #3)
> Works for me with firefox-20.0b7.es-ES.linux64 and 22.0 Beta.

Could you attach a screenshot of what you're seeing please.
Flags: needinfo?(deletesoftware+moz)
Flags: needinfo?(deletesoftware+moz)
Ok, with the CSS style given in comment #2, it works. But not with the simple code given in comment #0.
Attachment #752073 - Attachment description: screenshot: WFM on GNU/Linux (Fx 22.0 Beta) → screenshot: WFM on GNU/Linux (Fx 22.0 Beta, data URI added before comment 0)
(In reply to Aleksej [:Aleksej] from comment #7)
WFM, but the color is different.
On my side (Win 7), the data URI doesn't work, the background of the 2nd input stay white.
WFM on the latest Nightly and Firefox 21 builds, with the reporter's testcase. The background for the first input field is white, while for the second one it's light gray. The text in the first input field is black, while in the second one is gray.

Do you have any addons installed that might affect how websites are displayed? Please try reproducing this issue with a clean profile:
http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Flags: needinfo?(wayne.westmoreland)
(In reply to Ioana Budnar, QA [:ioana] from comment #10)
> WFM on the latest Nightly and Firefox 21 builds, with the reporter's
> testcase. The background for the first input field is white, while for the
> second one it's light gray. The text in the first input field is black,
> while in the second one is gray.
> 
> Do you have any addons installed that might affect how websites are
> displayed? Please try reproducing this issue with a clean profile:
> http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-
> firefox-profiles

Sorry, I missed this important part: I tested this on Windows 7 64-bit and on Ubuntu 13.04 32-bit.
The first thing Loic had me do was re-test with a clean profile, I just tried it again, I created a new profile, disabled all extensions and plugins.  The disabled field's background color still rendered as white. (I'm also using Windows 7 64-bit).
Flags: needinfo?(wayne.westmoreland)
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Jim, you marked this invalid in bug 451771 - but it seems IE and Chrome act differently here. Is that reason enough to reconsider?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jmathies)
Hardware: x86_64 → All
Version: 21 Branch → Trunk
(In reply to :Gijs Kruitbosch from comment #14)
> Jim, you marked this invalid in bug 451771 - but it seems IE and Chrome act
> differently here. Is that reason enough to reconsider?

dupe this over to bug 451771 I guess? Also, that would make a [good first bug][lang=c++], with you as the mentor! :)
Flags: needinfo?(jmathies)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: