Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/popovers/popover-focus-blur-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
<button>button</button>
<div popover='auto'><button autofocus>x</button></div>
<script>
const button = document.querySelector('button');
const popover = document.querySelector('[popover]');
button.focus();
button.addEventListener('blur', () => popover.removeAttribute('popover'));
popover.showPopover();
</script>