Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#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:


In dijit/form/CheckBox.js is the following:

setChecked: function(/*Boolean*/ checked){
      if(checked){ this.inputNode.setAttribute('checked', 'checked'); }
      else{ this.inputNode.removeAttribute('checked'); }
   }else{ this.inputNode.checked = checked; }

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 bill

Owner: set to Douglas Hays

comment:2 Changed 13 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

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.

comment:3 Changed 10 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.