Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#9259 closed defect (wontfix)

ValidationTextBox throws exception when destroyed by an onchange callback

Reported by: hborders Owned by: Douglas Hays
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


If the onchange callback of a ValidationTextBox? destroys the ValidationTextBox?, the ValidationTextBox? will try to reference the className of a null domNode on line 220 in _FormWidget.js.

Change History (3)

comment:1 Changed 13 years ago by Adam Peller

Component: GeneralDijit
Owner: changed from anonymous to Douglas Hays

a test case would be great if you've got one. also, have you tried 1.3.1?

comment:2 Changed 13 years ago by bill

Resolution: wontfix
Status: newclosed

I'm not surprised this breaks; I imagine it doesn't work for any widget if you try to destroy it in the middle of a callback.

It doesn't seem like a good idea anyway, because IE has various restrictions about what you can do in an event handler, and I suspect that deleting DOM nodes is off limits.

So, sorry, I don't want to spend code/time supporting this; as a workaround you can just do a

setTimeout(function(){ myWidget.destroy();}, 0);

in your onChange handler.

comment:3 Changed 11 years ago by bill

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