Skip to content

Commit

Permalink
Prevent double-focusing with autofocus="" inside <dialog>
Browse files Browse the repository at this point in the history
When the dialog focusing steps are called, we prevent further
autofocusing for the document. This fixes #4788.

Tests: web-platform-tests/wpt#19151
  • Loading branch information
tkent-google authored and domenic committed Nov 7, 2019
1 parent f476180 commit b48bb22
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -57860,6 +57860,18 @@ interface <dfn>HTMLDialogElement</dfn> : <span>HTMLElement</span> {

<li><p>Run the <span>focusing steps</span> for <var>control</var>.</p></li>

<li><p>Let <var>topDocument</var> be the <span>active document</span> of <var>control</var>'s
<span>node document</span>'s <span data-x="concept-document-bc">browsing context</span>'s
<span>top-level browsing context</span>.</p></li>

<li><p>If <var>control</var>'s <span>node document</span>'s <span>origin</span> is not the
<span data-x="same origin">same</span> as the <span>origin</span> of <var>topDocument</var>,
then return.</p></li>

<li><p><span data-x="list empty">Empty</span> <var>topDocument</var>'s
<span>autofocus candidates</span>.</p></li>

<li><p>Set <var>topDocument</var>'s <span>autofocus processed flag</span> to true.</p></li>
</ol>

<p>If at any time a <code>dialog</code> element is <span data-x="node is removed from a
Expand Down

0 comments on commit b48bb22

Please sign in to comment.