Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<dl>
<dt contenteditable></dt>
<dialog id=test2 open></dialog>
<dialog id=test2></dialog>
</dl>

<script>
Expand All @@ -51,6 +51,8 @@
// the dialog to be closed.
const dialog = document.querySelector('dialog#test2');
const controller = new AbortController();
document.querySelector('dt').focus();
dialog.open = true;
document.querySelector('dl').addEventListener("focusin", () => {
dialog.showModal();
},{signal:controller.signal});
Expand All @@ -59,7 +61,6 @@
dialog.open = false;
await new Promise(resolve => {
document.defaultView.requestIdleCallback(() => {
window.getSelection().addRange(document.createRange());
dialog.close();
resolve();
});
Expand Down
Loading