diff options
author | Scott González <scott.gonzalez@gmail.com> | 2014-07-17 11:08:57 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2014-07-17 11:30:31 -0400 |
commit | acfda4be521e48c6b61cc458a715ef163892ac36 (patch) | |
tree | 95b32a240604bafd81d2479aaa8539b3c783bda0 /ui | |
parent | ffe60e39db568f7acc3fff4b1a9f9f3a1d0b7c62 (diff) | |
download | jquery-ui-acfda4be521e48c6b61cc458a715ef163892ac36.tar.gz jquery-ui-acfda4be521e48c6b61cc458a715ef163892ac36.zip |
Dialog: Fix stacking of modal dialog overlays
Fixes #10138
Closes gh-1286
Diffstat (limited to 'ui')
-rw-r--r-- | ui/dialog.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/dialog.js b/ui/dialog.js index 0ee94e4cf..470676cbe 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 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 ); + } + this._show( this.uiDialog, this.options.show, function() { that._focusTabbable(); that._trigger( "focus" ); |