We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9750c8 commit 156df8fCopy full SHA for 156df8f
ui/jquery.ui.dialog.js
@@ -597,11 +597,14 @@ $.widget("ui.dialog", {
597
break;
598
case "zIndex":
599
if ( value > $.ui.dialog.maxZ ) {
600
- $.ui.dialog.maxZ = value;
601
-
602
- if ( self.overlay ) {
603
- $.ui.dialog.maxZ += 1;
604
- $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
+ // Increment the 'maxZ' counters when this dialog is currently visible
+ if ( self.isOpen() ) {
+ $.ui.dialog.maxZ = value;
+
+ if ( self.overlay ) {
605
+ $.ui.dialog.maxZ += 1;
606
+ $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
607
+ }
608
}
609
610
value = $.ui.dialog.maxZ;
0 commit comments