@@ -62,23 +62,44 @@ class WindowZModel {
6262 const isHajkWindow = windowElement . classList . contains ( "hajk-window" ) ;
6363 const hajkWindowContainer = document . getElementById ( "windows-container" ) ;
6464
65- // We need to get past Header on zIndex 1100 and Popper on 1400.
65+ // We need to get:
66+ // Over Header (AppBar) on zIndex 1100,
67+ // Over Drawer on 1200 and
68+ // Under Popovers at 1300.
6669
67- hajkWindowContainer . style . zIndex = isHajkWindow ? 1500 : null ;
70+ // So 1201 is a good number for zIndex on the window container.
71+ // If we need to handle more windows than 99 we will need to
72+ // configure MUI using a theme to change all default zIndexes.
73+
74+ // Default zIndexes is found here
75+ // https://mui.com/material-ui/customization/z-index/
76+
77+ // Below is from the MUI documentation 2025-03-25
78+ // ---------------------------------------------
79+ // mobile stepper: 1000
80+ // fab: 1050
81+ // speed dial: 1050
82+ // app bar: 1100
83+ // drawer: 1200
84+ // modal: 1300
85+ // snackbar: 1400
86+ // tooltip: 1500
87+
88+ hajkWindowContainer . style . zIndex = isHajkWindow ? 1201 : null ;
6889
6990 /**
7091 * The structure is like this:
7192 *
7293 * Header z 1100
7394 * ---- Search and Search list, z 1000 + dynamic
7495 *
75- * Window container z null or z 1500 when active
96+ * Window container z null or z 1201 when active
7697 * ---- Hajk window 1, z 1000 + dynamic
7798 * ---- Hajk window 2, z 1000 + dynamic
7899 * ---- Hajk window 3, z 1000 + dynamic
79100 * ---- etc etc.
80101 *
81- * Popper z 1400
102+ * Popovers z 1300
82103 */
83104 } ) ;
84105 }
0 commit comments