Closed Bug 294677 Opened 19 years ago Closed 19 years ago

Disabling button (input type=button) won´t change it´s font color when color was set by CSS

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 140732

People

(Reporter: morroida, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When you style a button using CSS, it won´t change the font color of that button
if you disable it then. For example, if you have button "b1", and you use CSS to
set its "color: red", and then you disable that button using
getElementByID("b1").disable = true, the button font won't change color, leaving
it RED even after disabled.

This can cause lots of problems. Users may still think the buttons are enabled,
trying to click on it with no sucess. IE render the disabled test with a font
effect similar to an emboss.

This can be, of course, fixed on the code, by changing the font color AFTER you
disable it. But WILL be a problem on older sites that would need to be
redesigned to change font color on disabled buttons.

Reproducible: Always

Steps to Reproduce:
1. Create a  simple HTML with a simples input button.
2. Set that button´s font color using CSS ('color: red', for example)
3. Use a javascript to change that button state to disabled
(document.[form].[button].disabled = true;

Actual Results:  
The button´s font color won´t change to appear as disabled

Expected Results:  
Change the button´s font color to a different one, maybe even showing an emboss
effect like IE does.
Proof of Concept.

Has three buttons that will NOT change font collor when disabled.

Only way to know it´s disabled is becuase it changes it´s label after disabled.


If tested under IE or other browser, test gets gray and engraved on the button,
showing it´s disabled.

Has great potential to confuse users.
See bug 140732 comment 5 for an explanation of why it has to be the way it is.

*** This bug has been marked as a duplicate of 140732 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: