Ticket #6759: multipledialog.patch
| File multipledialog.patch, 1.7 kB (added by becky, 7 months ago) |
|---|
-
Users/bgibson/Documents/workspace/trunk/dijit/Dialog.js
25 25 // summary: Append the underlay to the body 26 26 dojo.body().appendChild(this.domNode); 27 27 this.bgIframe = new dijit.BackgroundIframe(this.domNode); 28 this._modalConnect = null; 28 29 }, 29 30 30 31 layout: function(){ … … 58 59 if(this.bgIframe.iframe){ 59 60 this.bgIframe.iframe.style.display = "block"; 60 61 } 62 this._modalConnect = dojo.connect(this.domNode, "onmousedown", this, "_onMouseDown"); 61 63 }, 62 64 63 65 hide: function(){ … … 66 68 if(this.bgIframe.iframe){ 67 69 this.bgIframe.iframe.style.display = "none"; 68 70 } 71 dojo.disconnect(this._modalConnect); 72 this._modalConnect = null; 73 }, 74 75 _onMouseDown: function(/*Event*/ evt){ 76 dojo.stopEvent(evt); 77 window.focus(); 78 69 79 }, 70 80 71 81 uninitialize: function(){ … … 353 363 354 364 this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout")); 355 365 this._modalconnects.push(dojo.connect(window, "onresize", this, "layout")); 356 this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey")); 366 this._modalconnects.push(dojo.connect(this.domNode, "onkeypress", this, "_onKey")); 367 357 368 358 369 dojo.style(this.domNode, { 359 370 opacity:0, … … 368 379 this._fadeIn.play(); 369 380 370 381 this._savedFocus = dijit.getFocus(this); 371 382 372 383 // find focusable Items each time dialog is shown since if dialog contains a widget the 373 384 // first focusable items can change 374 385 this._getFocusItems(this.domNode);