From 06e39d90a5e24c0ef1be771e962226210fdb098c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 17 Jul 2014 11:08:57 -0400 Subject: [PATCH 1/2] Dialog: Fix stacking of modal dialog overlays Fixes #10138 --- ui/dialog.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/dialog.js b/ui/dialog.js index 0ee94e4cf99..704e1e02cdc 100644 --- a/ui/dialog.js +++ b/ui/dialog.js @@ -260,6 +260,14 @@ return $.widget( "ui.dialog", { this._position(); this._createOverlay(); this._moveToTop( null, true ); + + // Ensure the overlay is moved to the top with the dialog, but only when + // opening. The overlay shoudln't move after the dialog is open so that + // modeless dialogs opened after the modal dialog stack properly. + if ( this.overlay ) { + this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); + } + this._show( this.uiDialog, this.options.show, function() { that._focusTabbable(); that._trigger( "focus" ); From be51c79d64eba7c04e3717e4ce58a76286619613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 17 Jul 2014 11:16:36 -0400 Subject: [PATCH 2/2] [fixup]: typo --- ui/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/dialog.js b/ui/dialog.js index 704e1e02cdc..470676cbe22 100644 --- a/ui/dialog.js +++ b/ui/dialog.js @@ -262,7 +262,7 @@ return $.widget( "ui.dialog", { this._moveToTop( null, true ); // Ensure the overlay is moved to the top with the dialog, but only when - // opening. The overlay shoudln't move after the dialog is open so that + // opening. The overlay shouldn't move after the dialog is open so that // modeless dialogs opened after the modal dialog stack properly. if ( this.overlay ) { this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );