#5765 closed defect (fixed)
CheckBox checked value incorrect after setChecked() call in Internet Explorer
Reported by: | guest | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dijit - Form | Version: | 1.0 |
Keywords: | CheckBox | Cc: | |
Blocked By: | Blocking: |
Description
In dijit/form/CheckBox.js is the following:
setChecked: function(/*Boolean*/ checked){ if(dojo.isIE){ if(checked){ this.inputNode.setAttribute('checked', 'checked'); } else{ this.inputNode.removeAttribute('checked'); } }else{ this.inputNode.checked = checked; } this.inherited(arguments); }
I believe this behavior is incorrect for IE7. (My version is 7.0.5730.11)
In my testing with IE7 I found that after calling setChecked(false) inputNode.checked was still true. IE7 appears to take boolean assignments to inputNode.checked just fine. Please verify the need for this if(dojo.isIE) block and maybe change it to if(isIE && IEversion < 7) or whatever is equivalent.
Change History (3)
comment:1 Changed 13 years ago by
Milestone: | 1.0.3 → 1.1 |
---|---|
Owner: | set to Douglas Hays |
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Note: See
TracTickets for help on using
tickets.
Please verify that this works OK in the latest trunk (1.1). widget.setChecked(boolean) has been deprecated for the more generic widget.setAttribute('checked', boolean) that calls the new dojo.attr(node,'checked',boolean)which is calling node.setAttribute('checked',boolean). That code is no longer doing a removeAttribute for IE.