Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#11026 closed defect (invalid)

dijit.form.checkbox checked image not rendered until mouseover

Reported by: jtoth55 Owned by:
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.4.2
Keywords: dijit.form.checkbox Cc:
Blocked By: Blocking:


I have a dijit.form.checkbox widget that I'm declaring declaratively:

<input jsId="cbTest" id="cbTest" name="cbTest" dojoType="dijit.form.CheckBox?" />

If I programmatically set checked equal to true then it still shows as unchecked until I mouse over the checkbox, then it renders the checked image:

this.cbTest.checked = true;

I've been able to reproduce this issue in FF3, IE8, and Chrome 4. The theme I'm using is Tundra.

Change History (3)

comment:1 Changed 12 years ago by jtoth55

This can be closed, I figured out what was wrong. For others who struggle with this, the solution is to use .attr to set the checked value instead of using .checked:

this.cbTest.attr("checked", true);

It's a little confusing since .checked does work after mouseover but .attr is a suitable workaround.

comment:2 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

comment:3 Changed 11 years ago by bill

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