Skip to content

Commit 641d6aa

Browse files
authored
internal: use max z index for assertions menu overlay (#32130)
* internal: use max z-index for assertions menu overlay * update test html for high z-index
1 parent d35fc20 commit 641d6aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/app/src/runner/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function getOrCreateHelperDom ({ body, className, css, studioActive = fal
5252
left: '0',
5353
width: '100%',
5454
height: '100%',
55-
zIndex: '9999',
55+
zIndex: '2147483647', // use the max z-index value to ensure the shadow dom is on top of all other elements
5656
})
5757
}
5858

system-tests/projects/experimental-studio/cypress/e2e/highZIndexModal.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
width: 100%;
1010
height: 100%;
1111
background-color: rgba(0, 0, 0, 0.5);
12-
z-index: 2000;
12+
z-index: 2147483647;
1313
display: flex;
1414
justify-content: center;
1515
align-items: center;
@@ -81,10 +81,10 @@
8181
<button class="modal-close" onclick="closeModal()">&times;</button>
8282
<div class="modal-title">Large Modal with High Z-Index</div>
8383
<div class="modal-body">
84-
<p>This is a large modal that demonstrates a z-index of 2000. The modal covers the entire viewport and is positioned above all other elements on the page.</p>
84+
<p>This is a large modal that demonstrates a z-index of 2147483647. The modal covers the entire viewport and is positioned above all other elements on the page.</p>
8585
<p>Key features of this modal:</p>
8686
<ul>
87-
<li>Z-index: 2000 (very high priority)</li>
87+
<li>Z-index: 2147483647 (highest priority)</li>
8888
<li>Full viewport coverage</li>
8989
<li>Semi-transparent background overlay</li>
9090
<li>Centered content with responsive design</li>

0 commit comments

Comments
 (0)