Last active
August 16, 2024 09:11
-
-
Save uhyo/ed8b23fa723be9c12b396aa7a315fa28 to your computer and use it in GitHub Desktop.
Google Chrome top layer bug repro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>repro</title> | |
<style> | |
#popover1 { | |
top: 100px; | |
left: 100px; | |
width: 100px; | |
height: 100px; | |
} | |
</style> | |
</head> | |
<body> | |
<dialog id="dialog1"> | |
Dialog1 | |
</dialog> | |
<div popover="manual" id="popover1"> | |
Popover1 | |
</div> | |
<script> | |
const popover1 = document.getElementById('popover1'); | |
const dialog1 = document.getElementById('dialog1'); | |
dialog1.showModal(); | |
popover1.showPopover(); | |
dialog1.close(); | |
// Uncommenting the following line will fix the issue | |
// await new Promise(resolve => setTimeout(resolve, 0)); | |
dialog1.showModal(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment