#16475 closed defect (fixed)
TabContainer: exception on destroyRecursive(true)
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Dijit | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
See mailing list thread.
To reproduce this issue, navigate to dijit/tests/layout/test_TabContainer.html, and in the browser console, enter:
dijit.byId("mainTabContainer") .destroyRecursive(true)
The browser console returns:
"TypeError: Cannot read property 'id' of undefined"
StackController’s destroy looks like this:
destroy: function(){ for(var pane in this.pane2button){ this.onRemoveChild(dijit.byId(pane)); } this.inherited(arguments); }
The issue is that the pane has already been deleted, so dijit.byId(pane) fails.
Note that destroyDescendants() without an argument works fine because by the time that code is reached, the pane2Button[] hash is empty. Which leads to the real underlying issue, that StackContainer.destroyDescendants(true) doesn't call removeChild() on each child, even though it seems like it should.
Change History (4)
comment:1 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|---|
Status: | new → assigned |
Summary: | TabContainer: exception ondestroyRecursive(true) → TabContainer: exception on destroyRecursive(true) |
comment:4 Changed 8 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.
Marking this as 1.9 for now. The preserveDom flag was never claimed to work on templated widgets such as TabContainer, but still, this report exposes some cleanup that can be done on the code, so I'll do that.