From 128a87e7d96c34fb4a72c23623865a24ee23f9d5 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Mon, 5 Feb 2024 13:45:33 -0800 Subject: [PATCH 1/6] Close dialog elements when the open attribute is removed Fixes https://github.com/whatwg/html/issues/5802 This patch adds attribute change steps to run the dialog closing steps whenever the open attribute is removed in order to prevent a bad state where the dialog is hidden but modal which renders the rest of the page inert. --- source | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source b/source index dffcc9efcd2..c75aef9fef3 100644 --- a/source +++ b/source @@ -61051,9 +61051,23 @@ interface HTMLDialogElement : HTMLElement { +

The following attribute change + steps, given element, localName, oldValue, + value, and namespace are used for dialog elements:

+ +
    +
  1. If namespace is not null, then return.

  2. + +
  3. If localName is not open, then + return.

  4. + +
  5. If value is null, then close the dialog given + element.

  6. +
+

Removing the open attribute will usually hide the - dialog. However, doing so has a number of strange additional consequences: + dialog. However, doing so used to have a number of strange additional consequences: