From aebd2cf282dfa37a41aee332a871b3c651432900 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 6 Jun 2023 11:07:37 -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 328fbab5a43..c3a508ab7bc 100644 --- a/source +++ b/source @@ -60289,6 +60289,9 @@ interface HTMLDialogElement : HTMLElement {
  • Remove subject's open attribute.

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

  • +
  • 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.