Skip to content

Commit 42c18da

Browse files
committed
Fire events at least for async removal
1 parent 14eb00c commit 42c18da

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

source

+12-9
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
18131813

18141814
<p class="note">This does <em>not</em> perform the <span>unfocusing steps</span>,
18151815
<span>focusing steps</span>, or <span>focus update steps</span>, and thus no <code
1816-
data-x="event-blur">blur</code> event is fired.</p>
1816+
data-x="event-blur">blur</code> or <code data-x="event-change">change</code> events are
1817+
fired.</p>
18171818
</li>
18181819

18191820
<li><p>If <var>removedNode</var> is an element whose <span
@@ -77073,8 +77074,9 @@ partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {
7707377074
named <code data-x="event-blur">blur</code> at <var>blur event target</var>, with
7707477075
<var>related blur target</var> as the related target.</p>
7707577076

77076-
<p class="note">In some cases, e.g. if <var>entry</var> is an <code>area</code>
77077-
element's shape, a scrollable region, or a <span>viewport</span>, no event is fired.</p>
77077+
<p class="note" id="note-sometimes-no-blur-event">In some cases, e.g. if <var>entry</var> is
77078+
an <code>area</code> element's shape, a scrollable region, or a <span>viewport</span>, no
77079+
event is fired.</p>
7707877080
</li>
7707977081
</ol>
7708077082
</li>
@@ -96730,21 +96732,22 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
9673096732
<li id="focus-fixup-rule">
9673196733
<p>For each <span>fully active</span> <code>Document</code> in <var>docs</var>, if the <span
9673296734
data-x="focused area of the document">focused area</span> of that <code>Document</code> is no
96733-
longer a <span>focusable area</span>, then set that <code>Document</code>'s <span
96734-
data-x="focused area of the document">focused area</span> to its <span>viewport</span>.</p>
96735+
longer a <span>focusable area</span>, then run the <span>focusing steps</span> for that
96736+
<code>Document</code>'s <span>viewport</span>.</p>
9673596737

9673696738
<p class="example">For example, this might happen because an element has the <code
9673796739
data-x="attr-hidden">hidden</code> attribute added, causing it to stop <span>being
9673896740
rendered</span>. It might also happen to an <code>input</code> element when the element gets
9673996741
<span data-x="concept-fe-disabled">disabled</span>.</p>
9674096742

96741-
<p class="note">This does <em>not</em> perform the <span>unfocusing steps</span>,
96742-
<span>focusing steps</span>, or <span>focus update steps</span>, and thus no <code
96743-
data-x="event-blur">blur</code> event is fired.</p>
96743+
<p class="note">This will <a href="#note-sometimes-no-blur-event">usually</a> fire <code
96744+
data-x="event-blur">blur</code> events, and possibly <code data-x="event-change">change</code>
96745+
events.</p>
9674496746

9674596747
<p class="note">In addition to this asynchronous fixup, if the <span>focused area of the
9674696748
document</span> is removed, there is a <a href="#node-remove-focus-fixup">synchronous
96747-
fixup</a>.</p>
96749+
fixup</a>. That one will <em>not</em> fire <code data-x="event-blur">blur</code> or <code
96750+
data-x="event-change">change</code> events.</p>
9674896751
</li>
9674996752

9675096753
<li>

0 commit comments

Comments
 (0)