Ticket #1836 (closed defect: fixed)
Menu: not fully destroyed (target nodes still bound)
| Reported by: | guest | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 0.4 |
| Severity: | normal | Keywords: | Menu2 PopupMenu2 |
| Cc: |
Description
PopupMenu?2 initializers bind to the target nodes, but that is currently not undone when destroying the widget (this breaks any future menu functionality on those nodes).
The passive workaround is to unbind the target nodes before destroying:
var menu = dojo.widget.byId('mymenu');
dojo.lang.forEach(menu.targetNodeIds, menu.unBindDomNode, menu);
menu.destroy();
I'm not sure what the proper override is in Menu2.js (Widget::cleanUp, Widget::uninitialize, Widget::destroyRendering ?), but a patch might look like this:
uninitialize: function(){
dojo.lang.forEach(this.targetNodeIds, this.unBindDomNode, this);
}
Change History
Note: See
TracTickets for help on using
tickets.