Opened 13 years ago
Closed 13 years ago
#5442 closed defect (fixed)
DojoX resizeHandle fails on destroy(). (this._connects is filled with incorrect entries)
Reported by: | guest | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dojox | Version: | 1.0 |
Keywords: | resizehandle destroy _connects | Cc: | |
Blocked By: | Blocking: |
Description
When trying to destroy() a resizeHandle it fails and complains that dojo.disconnect must be passed an array. After tracing through the code a bit I found that after you disconnect the listeners in resizeHandles's _endSizing function that the _connects array is not changed to reflect that the events have been disconnected. I added a this._connects = []; whicih is shown in bold below, but you may have a better solution.
_endSizing: function(/*Event*/ e){
summary: disconnect listenrs and cleanup sizing
dojo.forEach(this._connects,function(c){
dojo.disconnect(c);
});
this._connects = [];
if(!this.activeResize){
dojo.fadeOut({ node:this._activeResizeNode, duration:250,
onEnd: dojo.hitch(this,function(){
this._activeResizeNode.style.display="none";
})
}).play(); this._changeSizing(e);
} this._isSizing = false;
}
Change History (4)
comment:1 Changed 13 years ago by
Owner: | changed from Adam Peller to dante |
---|
comment:2 Changed 13 years ago by
also, it might be good to use dijit._Widget.connect instead of dojo.connect
comment:3 Changed 13 years ago by
Milestone: | 1.0.3 → 1.1 |
---|---|
Status: | new → assigned |
i'm against dojox fixes in branch unless deemed absolutely critical.
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
If the solution is this trivial, it might be hard to argue against inclusion in 1.0.3, though we typically would put non-critical dojox fixes in 1.1.