blob: 54de723762e48abe9c3ad27277913b06ffdd78d8 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<!DOCTYPE html>
2<html>
3<meta charset='utf-8'>
4<head>
5<script src="../dist/dialog-polyfill.js"></script>
6<link rel="stylesheet" type="text/css" href="../dist/dialog-polyfill.css">
7</head>
8<body>
9
10 <p>
11The dialog below is incorrectly positioned within a stacking context.
12It should generate a console warning message, and place the <code>_dialog_overlay</code> in a different place in order to try to work around the problem without moving the dialog itself.
13 </p>
14
15<div style="position: absolute; top: 100px; left: 10vw; width: 80vw; height: 400px; background: blue; opacity: 0.7;">
16
17<dialog>
18 <form method="dialog">
19 <input type="submit" />
20 </form>
21 <p>
22 Help, I'm inside an extra stacking context D:
23 </p>
24</dialog>
25
26</div>
27
28<button id="show">Show Dialog</button>
29
30<script>
31var dialog = document.querySelector('dialog');
32dialogPolyfill.registerDialog(dialog);
33dialog.showModal();
34
35show.addEventListener('click', function() {
36 dialog.showModal();
37});
38
39</script>
40</body>
41</html>