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 f48b4c6 commit c131c95Copy full SHA for c131c95
ui/jquery.ui.dialog.js
@@ -598,11 +598,14 @@ $.widget("ui.dialog", {
598
break;
599
case "zIndex":
600
if ( value > $.ui.dialog.maxZ ) {
601
- $.ui.dialog.maxZ = value;
602
-
603
- if ( self.overlay ) {
604
- $.ui.dialog.maxZ += 1;
605
- $.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 ) {
606
+ $.ui.dialog.maxZ += 1;
607
+ $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
608
+ }
609
}
610
611
value = $.ui.dialog.maxZ;
0 commit comments