From 7566bcc668b8a7e9806c15f679165e8596dd0360 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Mon, 6 Jan 2025 11:45:40 -0800 Subject: [PATCH] Make dialog focus async when removing open attribute When the dialog's open attribute is removed which closes the dialog, we should make the focus async in order to prevent more script from running inside attribute removal. Context: https://github.com/whatwg/html/pull/10124#discussion_r1483640232 Bug: 341935362 Change-Id: I1b76f003e04b802b1868b427a0faddf5f19a3c5e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6085725 Reviewed-by: Di Zhang Commit-Queue: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1402551} --- .../dialog-close-via-attribute.tentative.html | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.tentative.html b/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.tentative.html index 5c2e70f87a6101c..4ccac5b31cf2e76 100644 --- a/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.tentative.html +++ b/html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.tentative.html @@ -7,14 +7,20 @@ -hello world + + +