Opened 13 years ago

Closed 13 years ago

#8052 closed defect (duplicate)

destoryRecursive() causes 'this.toolbar is undefined'

Reported by: cb1kenobi Owned by: liucougar
Priority: high Milestone: tbd
Component: Editor Version: 1.2.0
Keywords: destroy destroyRecursive editor Cc:
Blocked By: Blocking:


Calling destroyRecursive() on a widget with a dijit.Editor in its template will cause the editor's toolbar to get destroyed before editor's destroy is called which causes the editor's destroy() to barf.

It could be hacked with a simple if(this.toolbar){...}, but this is probably a much more fundamental problem with destroyRecursive().

Attachments (1)

destroyRecursive_widget_with_editor.html (1.4 KB) - added by cb1kenobi 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by cb1kenobi

comment:1 Changed 13 years ago by bill

Resolution: duplicate
Status: newclosed

I'm going to close this as a duplicate of #8015.

The problem is unrelated to dijit.Editor or the widgetsInTemplate feature. It's that you are putting the Editor inside the main widget's containerNode. Since it's a widget declared in the template it's listed in the _supportingWidgets attribute and thus it's double-destroyed.

Note: See TracTickets for help on using tickets.