Skip to content

Commit 5ded2d8

Browse files
authored
Don't change focus when re-focusing delegatesFocus shadow host
Doing otherwise causes https://github.com/web-platform-tests/wpt/blob/4c24c9acd809eb8630e795e3f8e3a787d9d6d039/html/semantics/interactive-elements/the-dialog-element/dialog-focus-shadow-double-nested.html to fail on the document.activeElement check. This matches some previous discussions in WICG/webcomponents#840 and #5039.
1 parent 906c16f commit 5ded2d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76664,9 +76664,11 @@ partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {
7666476664

7666576665
<dd>
7666676666
<ol>
76667-
<li><p>If <var>focus target</var> is a <span>shadow-including inclusive ancestor</span> of the
76668-
<span>currently focused area of a top-level traversable</span>'s <span>DOM anchor</span>, then
76669-
return null.</p></li>
76667+
<li><p>Let <var>focusedElement</var> be the <span>currently focused area of a top-level
76668+
traversable</span>'s <span>DOM anchor</span>.</p></li>
76669+
76670+
<li><p>If <var>focus target</var> is a <span>shadow-including inclusive ancestor</span> of
76671+
<var>focusedElement</var>, then return <var>focusedElement</var>.</p></li>
7667076672

7667176673
<li><p>Return the <span>focus delegate</span> for <var>focus target</var> given <var>focus
7667276674
trigger</var>.</p></li>

0 commit comments

Comments
 (0)