Changeset 12068
- Timestamp:
- 01/17/08 09:50:40 (12 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
Dialog.js (modified) (4 diffs)
-
tests/test_Dialog_focusDestroy.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/Dialog.js
r12044 r12068 149 149 this.connect(this, "onExecute", "hide"); 150 150 this.connect(this, "onCancel", "hide"); 151 this._modalconnects = []; 151 152 }, 152 153 … … 162 163 // time (but we defer it until right beforehand, for 163 164 // performance reasons) 164 165 this._modalconnects = [];166 165 167 166 if(this.titleBar){ … … 282 281 // summary: display the dialog 283 282 283 if(this.open){ return; } 284 284 285 // first time we show the dialog, there's some initialization stuff to do 285 286 if(!this._alreadyInitialized){ … … 347 348 this._position(); 348 349 } 350 }, 351 352 destroy: function(){ 353 dojo.forEach(this._modalconnects, dojo.disconnect); 354 if(this.open){ 355 var fo = this._savedFocus; 356 setTimeout(dojo.hitch(dijit,"focus",fo),25); 357 } 358 this.inherited(arguments); 349 359 } 350 360 } -
dijit/trunk/tests/test_Dialog_focusDestroy.html
r12065 r12068 28 28 29 29 var input = document.createElement("input"); 30 dojo.attr(input,"tabIndex"," 1");30 dojo.attr(input,"tabIndex","0"); 31 31 dlg.containerNode.appendChild(input); 32 32 … … 37 37 console.log("destroying, while visible"); 38 38 dlg.destroy(); 39 39 40 }); 40 41 dlg.show();