Skip to content

Commit 4374bf2

Browse files
AtkinsSJtcl3
authored andcommitted
LibWeb/HTML: Fix dialog focus restoring descendant check
Corresponds to whatwg/html@8213584
1 parent 89f3616 commit 4374bf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/LibWeb/HTML/HTMLDialogElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void HTMLDialogElement::close_the_dialog(Optional<String> result)
351351
// FIXME: 12. If subject's previously focused element is not null, then:
352352
// 1. Let element be subject's previously focused element.
353353
// 2. Set subject's previously focused element to null.
354-
// 3. If subject's node document's focused area of the document's DOM anchor is a shadow-including inclusive descendant of element,
354+
// 3. If subject's node document's focused area of the document's DOM anchor is a shadow-including inclusive descendant of subject,
355355
// or wasModal is true, then run the focusing steps for element; the viewport should not be scrolled by doing this step.
356356

357357
// 13. Queue an element task on the user interaction task source given the subject element to fire an event named close at subject.

0 commit comments

Comments
 (0)