Index: dojo-release-1.3.2-src/dijit/Dialog.js =================================================================== --- dojo-release-1.3.2-src.orig/dijit/Dialog.js 2010-04-20 06:55:35.000000000 -0700 +++ dojo-release-1.3.2-src/dijit/Dialog.js 2010-04-20 06:55:50.000000000 -0700 @@ -215,6 +215,10 @@ node.style.visibility="hidden"; node.style.top = "-9999px"; this._underlay.hide(); + + if (this.refocus) { + dijit.focus(this._savedFocus); + } }) }); }, @@ -399,9 +403,6 @@ } dojo.forEach(this._modalconnects, dojo.disconnect); this._modalconnects = []; - if(this.refocus){ - this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus)); - } if(this._relativePosition){ delete this._relativePosition; } @@ -434,6 +435,8 @@ dijit._overlayStack.pop(); dijit._overlayStack.pop(); this._underlay.destroy(); + if (this._fadeIn) this._fadeIn.destroy(); + if (this._fadeOut) this._fadeOut.destroy(); delete this._fadeIn; delete this._fadeOut; dojo.forEach(this._modalconnects, dojo.disconnect);