#1737 closed defect (fixed)
FloatingPane destroy does not destroy its resize handle (leak)
Reported by: | Owned by: | liucougar | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4 |
Keywords: | FloatingPane leak | Cc: | |
Blocked By: | Blocking: |
Description
After calling destroy on a FloatingPane?, its resizeHandle is not destroyed and can still be accessed from dojo.widget.manager.widgets.
the pb is in function fillInTemplate,
the line
this.resizeBar.appendChild(this.resizeHandle.domNode);
should actually be
this.addChild(this.resizeHandle, this.resizeBar);
pb found in 0.3.1, but it is also present in 0.4
Change History (6)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
I think the proper way to fix the pb is:
destroy: function() {
if (this.resizeHandle){
this.resizeHandle.destroy(); this.resizeHandle = null;
}
return dojo.widget.FloatingPane?.superclass.destroy.call(this);
},
comment:3 Changed 14 years ago by
Milestone: | → 0.4.1 |
---|---|
Owner: | changed from bill to liucougar |
Cougar is going to fix; I don't want to do an addChild() because then the resizeHandle widget will show up in the children[] array, which is not what the user expects. But it should be deleted in the destroy() method.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment: the fix I have suggested works only with dynamically created floating panes. It breaks floating panes created statically (no resize handle anymore).