Closed
Bug 210076
Opened 21 years ago
Closed 21 years ago
"Disabled" state of HTML form is not restored when RESET input control is clicked. If some Javascript had changed disabled property to false after form is loaded, and form is reset, state remains as "elem.disabled=false".
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: phone, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529
<form name="test">
<select name="list1" disabled>
<option value="1">string1</option>
<option value="2">string2</option>
</select>
<input type="button" value="click here"
onClick="document.test.list1.disabled=false;">
<input type="reset" value="reset">
</form>
Reproducible: Always
Steps to Reproduce:
1.Display html form.
2.Activate Javascript function that changes "disabled" property to false:
(document.test.list1.disabled=false)
3.Click "reset" input control.
Actual Results:
Form element remains in the same enabled state
(as if document.test.list1.disabled==false)
Expected Results:
Form element should become disabled
(as if document.test.list1.disabled==true)
Comment 1•21 years ago
|
||
The definition of "reset" is:
# reset buttons: When activated, a reset button resets all controls to their
initial values.
Where "initial values" is defined as the value attribute, except for textarea.
Why exactly should this change the "disabled" state?
Comment 2•21 years ago
|
||
Not only does it not fit the spec, I'd be highly surprised if IE did this
either. Could you post a testcase or post what happens when you do this in IE?
Section 17.12.1 "Disabled controls" defines "disabled" as boolean attribute, not
a value. I can't find any specifications on restoration of attributes, so, it
seems that I was wrong, and some onClick script should set its attribute to
initial state if needed (as the only way to modify dynamically the value of the
disabled attribute).
Aleksey.
Comment 4•21 years ago
|
||
.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•