Opened 11 years ago

Closed 11 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 11 years ago by Adam Peller

Owner: changed from Adam Peller to dante

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.

comment:2 Changed 11 years ago by Adam Peller

also, it might be good to use dijit._Widget.connect instead of dojo.connect

comment:3 Changed 11 years ago by dante

Milestone: 1.0.31.1
Status: newassigned

i'm against dojox fixes in branch unless deemed absolutely critical.

comment:4 Changed 11 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [11902]) fixes #5442 - adds tests for .destroy() a resize handle, privitized persistant connect, and other cleanups. !strict

Note: See TracTickets for help on using tickets.