From 4374bf220243faa2d98846f99728082c6b4dcd77 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 20 Feb 2025 12:47:06 +0000 Subject: [PATCH] LibWeb/HTML: Fix dialog focus restoring descendant check Corresponds to https://github.com/whatwg/html/commit/82135842dc1f3cb80a9c815921ef5929a63e9855 --- Libraries/LibWeb/HTML/HTMLDialogElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp index a10a0cc36b0..6eead2d5be5 100644 --- a/Libraries/LibWeb/HTML/HTMLDialogElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLDialogElement.cpp @@ -351,7 +351,7 @@ void HTMLDialogElement::close_the_dialog(Optional result) // FIXME: 12. If subject's previously focused element is not null, then: // 1. Let element be subject's previously focused element. // 2. Set subject's previously focused element to null. - // 3. If subject's node document's focused area of the document's DOM anchor is a shadow-including inclusive descendant of element, + // 3. If subject's node document's focused area of the document's DOM anchor is a shadow-including inclusive descendant of subject, // or wasModal is true, then run the focusing steps for element; the viewport should not be scrolled by doing this step. // 13. Queue an element task on the user interaction task source given the subject element to fire an event named close at subject.