Opened 10 years ago

Closed 8 years ago

#10242 closed defect (fixed)

ContentPane: doesn't call destroy on non-widgets like dojo.dnd.Source

Reported by: jbarzilai Owned by: bill
Priority: high Milestone: 1.8
Component: Dijit Version: 1.4.0b
Keywords: dnd, destroy Cc:
Blocked By: Blocking:

Description (last modified by bill)

When I have a dojo.dnd.Source inside a ContentPane and I call destroy/destroyRecursive/destroyDescendants on the ContentPane? the Source is never destroyed. This leaves hanging subscriptions which cause problems.

I've attached a detailed test case.

Attachments (1)

test_DestroySource.html (3.1 KB) - added by jbarzilai 10 years ago.
Test case demonstating bug, instructions inside

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by jbarzilai

Attachment: test_DestroySource.html added

Test case demonstating bug, instructions inside

comment:1 Changed 10 years ago by bill

Milestone: tbd1.5
Summary: dojo.dnd.Source: destroy never called when inside a ContentPaneContentPane: doesn't call destroy on non-widgets like dojo.dnd.Source

Thanks for the test case.

Probably can fix this better in ContentPane than in the DnD code, since ContentPane has the list of objects created by the parser.

Maybe make ContentPane.destroyDescendants() call destroy() on everything from the parser's list that doesn't already have the _destroyed flag set.

comment:2 Changed 10 years ago by bill

Component: DnDDijit
Owner: Eugene Lazutkin deleted

comment:3 Changed 10 years ago by bill

Milestone: 1.52.0

I think the main issue is that ContentPane doesn't have the list of objects created by the parser.

This will need to wait until (at least) 2.0, when I change the parser so that it doesn't recurse into ContentPane, and rather ContentPane is responsible for parsing it's contents.

comment:4 Changed 8 years ago by bill

Description: modified (diff)
Milestone: 2.01.8
Owner: set to bill
Status: newassigned

1.6 or 1.7 refactored ContentPane and the parser to have the list of objects created by the parser, so this is now solvable.

See also [23871], [26740], same issue but with startup().

comment:5 Changed 8 years ago by bill

Resolution: fixed
Status: assignedclosed

In [27009]:

Make destroying a ContentPane destroy non-widget children like dojo.dnd.Source. Fixes #10242 !strict.

Note: See TracTickets for help on using tickets.