Open Bug 432096 Opened 12 years ago Updated 4 years ago

Changing button.disabled via DOM has no effect until a script finishes execution


(Core :: DOM: Core & HTML, defect)

Windows XP
Not set




(Reporter: duncan.loveday, Unassigned)


(Keywords: regression, testcase)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050306 Minefield/3.0pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008050306 Minefield/3.0pre

Starting with a disabled button, e.g. <input kind="button" ... disabled>, executing "myButton.disabled=false;" in a script followed by, say, ";" will not fire the onclick handler, as if the button is still disabled.

The test case does this in an onload handler and the onclick handler does not run although the form is displayed with the button enabled once onload is complete.

Reproducible: Always

Steps to Reproduce:
1. Load the attached test case
Actual Results:  
A single alert "theButton.disabled=false" is displayed.

Expected Results:  
Two alerts, first "Clicked" followed by "theButton.disabled=false" should be displayed.

Works in IE and Opera
Attached file Test case
Keywords: testcase
Regressed in Sept 2004.
Ever confirmed: true
Keywords: regression
Version: unspecified → Trunk
Flags: blocking1.9?
Ria, FF2 has the same behavior, right?
Yes indeed. I thought it might not be blocking 1.9 because it is an old bug, but just in case.
Given that FF2 and FF3 have the same behavior we cannot block FF3 for this.
Flags: blocking1.9? → blocking1.9-
Component: DOM: HTML → DOM: Core & HTML
This still fails on Firefox 17 and also works correctly on Chrome.  Adding 
        -moz-user-input: enabled;
to the INPUT type=button seems to workaround the problem.
Reproduced with latest Nightly.

Version 	48.0a1
Build ID 	20160418030305
Update Channel 	nightly
User Agent 	Mozilla/5.0 (Windows NT 5.1; rv:48.0) Gecko/20100101 Firefox/48.0
You need to log in before you can comment on or make changes to this bug.