From dff16586e9dc63418798ff8085892669aa5dfbe7 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 7 Jun 2023 03:18:47 -0700 Subject: [PATCH] Fix modal check in dialog closing algorithm The value for is modal needs to be cached. This was pointed out here: https://github.com/whatwg/html/pull/9178#issuecomment-1577501107. --- source | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source b/source index 2e484b0eb3f..cbab379fce5 100644 --- a/source +++ b/source @@ -60452,6 +60452,9 @@ interface HTMLDialogElement : HTMLElement {
  • If the is modal flag of subject is true, then remove it from its Document's top layer.

  • +
  • Let wasModal be the value of subject's is + modal flag.

  • +
  • Set the is modal flag of subject to false.

  • If result is not null, then set the HTMLDialogElement : HTMLElement {

  • If subject's node document's focused area of the document's DOM anchor is a shadow-including inclusive - descendant of element, or subject's is modal is true, - then run the focusing steps for element; the viewport should not be - scrolled by doing this step.

  • + descendant of element, or wasModal is true, then run the + focusing steps for element; the viewport should not be scrolled by + doing this step.