Opened 4 years ago

Closed 4 years ago

#18597 closed defect (invalid)

onChange event not firing in dijit CheckBox

Reported by: srikanth_desu Owned by:
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

Hi,

We have upgraded dojo version from 1.7.3 to 1.10.4 in our application.After upgrade onChange event not firing for dijit CheckBox?

Below is the code example which is working fine in 1.7.3 and not working in 1.10.4.

var x = new dijit.form.CheckBox();
x.onChange = function(b){ 
                    alert(b);   //alert will display in Dojo 1.7.3 version
             }
x.set("checked",false);

Change History (1)

comment:1 Changed 4 years ago by bill

Resolution: invalid
Status: newclosed

Oh, it's not supposed to fire when you change the value programatically. It only fires when the user changes the value. This is by design and mirrors how native HTML elements behave.

Note: See TracTickets for help on using tickets.