Opened 13 years ago

Closed 13 years ago

#8802 closed defect (fixed)

page unload tries to double-destroy widgets (mail demo this.toolbar error)

Reported by: bill Owned by: bill
Priority: high Milestone: 1.3
Component: Dijit Version: 1.3.0b2
Keywords: Cc:
Blocked By: Blocking:


This is similar to a number of other tickets, but I couldn't find one about page unload.

When closing the mail demo or navigating to another page on IE, I get a "this.toolbar not found error" on page unload.

The problem is this code:

	dijit.registry.forEach(function(widget){ widget.destroy(); });

It apparently calls toolbar.destroy() and then calls editor.destroy().

A better design is probably to just call destroyRecursive() on all top level widgets. As per the work on #6954 this is now possible... just need a modified version of _Widget.getChildren() that

Change History (1)

comment:1 Changed 13 years ago by bill

Resolution: fixed
Status: newclosed

(In [16919]) Different algorithm for destroying widgets on page unload, to avoid the double delete of nested widgets. Fixes #8802 !strict.

Moved bulk of _Widget.getChildren() code into dijit.getChildren() so I could use it on <body>, to find direct descendants.

Note: See TracTickets for help on using tickets.