Ticket #5765 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

CheckBox checked value incorrect after setChecked() call in Internet Explorer

Reported by: guest Owned by: doughays
Priority: normal Milestone: 1.1
Component: Dijit Version: 1.0
Severity: normal Keywords: CheckBox
Cc:

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

Changed 7 months ago by bill

  • owner set to doughays
  • milestone changed from 1.0.3 to 1.1

Changed 7 months ago by doughays

  • status changed from new to closed
  • resolution set to fixed

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.

Note: See TracTickets for help on using tickets.