Opened 12 years ago
Closed 12 years ago
#8344 closed defect (fixed)
dojo.attr(node, "readonly", ...) not working in firefox / safari
Reported by: | s_i_z_o | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dijit | Version: | 1.2.3 |
Keywords: | dijit.form.TextBox readonly firefox | Cc: | |
Blocked By: | Blocking: |
Description
In test page for nightly builds:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/Form.html
Read-only widget on the bottom of the page is not really readonly in firefox 2.0.0.20. Value can be changed and is posted on submit. It is working in IE 7.x, didn't check other browsers.
Change History (4)
comment:1 Changed 12 years ago by
Owner: | set to Douglas Hays |
---|---|
Summary: | dijit.form.TextBox readonly not working in firefox → dojo.attr(node, "readonly", ...) not working in firefox / safari |
comment:2 Changed 12 years ago by
Reference page: http://www.w3schools.com/htmldom/prop_text_readonly.asp
comment:3 Changed 12 years ago by
Also, Cougar pointed out that this is basically a dup of #7896, except for FF/safari rather than IE8. Anyway, needs to be tested on all browsers.
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Good catch. It happens in FF3 and safari too. The problem is in dojo.attr(), you can try this in firebug from that page to see:
The problem started in [12332] for #5781. The root issue is that when setting the readonly property via
node.readOnly = true
"readOnly" needs to be in camel case, not lower case. Previously the dojo.attr() code called node.setAttribute(), which is case insensitive, but after [12332] it started assigning the property directly.
I guess fixAttr() should be changed to always convert readonly to readOnly, for all browsers?