Skip to content

Dialog: Fix stacking of modal dialog overlays #1286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ui/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't :)

// 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" );
Expand Down