If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

readonly on input cannot be unset using dhtml

RESOLVED INVALID

Status

()

Core
DOM
RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: Adriaan van Kekem, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); nl-NL; rv:1.9b4pre) Gecko/2008030212 Firefox/3.0b4pre (Swiftfox)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); nl-NL; rv:1.9b4pre) Gecko/2008030212 Firefox/3.0b4pre (Swiftfox)

having a readonly input cannot be set by javascript to writable. You have to do a document.getElementById('test').removeAttribute("readonly") to fix this, but i think the example below should also work?

example:
<body>
<input type="checkbox" readonly="readonly" value="test" id="test"/>
<button onclick="document.getElementById('test').readonly = false">set to write</button>
</body>


Reproducible: Always

Steps to Reproduce:
1.create a page with the example above
2.click on the button and try to change the input
3.
Actual Results:  
no change happens on input (visually!, the javascript value still changed)

Expected Results:  
the input box should be changed
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general

Comment 1

10 years ago
It is .readOnly, not .readonly and it works only with <input type="text">
and <input type="password">. See http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-88461592
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.