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-previous-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<button id="b">click</button>
<div id="p" popover="auto"><input autofocus></div>
<script>
document.getElementById('b').focus();
document.getElementById('p').showPopover();
document.getElementById('b').addEventListener('focus', () => {
document.getElementById('p').removeAttribute('popover');
});
document.getElementById('p').hidePopover();
</script>