Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#5326 closed defect (fixed)

destroyDescendants tried to remove already removed childs

Reported by: guest Owned by: bill
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: dijit Cc:
Blocked By: Blocking:


getDescendants returns all descendants, not only immediate. So destroyDescendants should call destroy instead of destroyRecursive. This bug can be reproduced in dijit/test_Tree.html (expand all leaves in tree and press destroy button - it will remove not only tree, but all widgets)

Index: _Widget.js
--- _Widget.js	(revision 11729)
+++ _Widget.js	(working copy)
@@ -235,7 +235,7 @@
 		//		descendants.
 		// TODO: should I destroy in the reverse order, to go bottom up?
-		dojo.forEach(this.getDescendants(), function(widget){ widget.destroyRecursive(); });
+		dojo.forEach(this.getDescendants(), function(widget){ widget.destroy(); });
 	uninitialize: function(){

Change History (3)

comment:1 Changed 15 years ago by Adam Peller

Milestone: 1.1
Owner: set to bill

comment:2 Changed 15 years ago by bill

Resolution: fixed
Status: newclosed

(In [11735]) Fix regression in [11688] that was causing double destroy calls on same widget. Fixes #5326, Refs #1836, #4902.

comment:3 Changed 15 years ago by dante

(In [11768]) fixes #5326 - the title text is display:block, causing the line wrap in ie7. (float:right) ... setting to inline fixes.

Note: See TracTickets for help on using tickets.