Skip to content

Commit 3a5f3e0

Browse files
committed
update deactivate timing
1 parent 1b12ed5 commit 3a5f3e0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -692,27 +692,28 @@ <h3>Extensions to the HTMLElement interface</h3>
692692
</dl>
693693
<ol>
694694
<li>If [=this=]'s [=Element/local name=] is neither a [=valid shadow host name=] nor "<code>canvas</code>", then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}.</li>
695+
695696
<li>If |editContext| is not null, then:
696697
<ol>
697698
<li>If |editContext|'s <a>associated element</a> is equal to [=this=], then terminate these steps.</li>
698699
<li>If |editContext|'s <a>associated element</a> is not null, then [=exception/throw=] a {{"NotSupportedError"}} {{DOMException}}.</li>
699-
<li>Set |editContext|'s <a>associated element</a> to [=this=].</li>
700700
</ol>
701701
</li>
702702
<li>Let |oldEditContext| be the value of [=this=]'s internal [[\EditContext]] slot.</li>
703+
<li>
704+
If |oldEditContext| is not null and |oldEditContext| is [=this=]'s
705+
<a href="https://dom.spec.whatwg.org/#concept-node-document">node document</a>'s
706+
[=active EditContext=], then run the steps to [=deactivate an EditContext=]
707+
with |oldEditContext|.
708+
</li>
709+
<li>If |editContext| is not null, then set |editContext|'s <a>associated element</a> to [=this=].
703710
<li>If |oldEditContext| is not null, then:
704711
<ol>
705712
<li>[=Assert=]: |oldEditContext|'s <a>associated element</a> is equal to [=this=].</li>
706713
<li>Set |oldEditContext|'s <a>associated element</a> to null.</li>
707714
</ol>
708715
</li>
709716
<li>Set [=this=]'s internal [[\EditContext]] slot to be |editContext|.</li>
710-
<li>
711-
If |oldEditContext| is not null and |oldEditContext| is [=this=]'s
712-
<a href="https://dom.spec.whatwg.org/#concept-node-document">node document</a>'s
713-
[=active EditContext=], then run the steps to [=deactivate an EditContext=]
714-
with |oldEditContext|.
715-
</li>
716717
</ol>
717718
</div><!-- algorithm -->
718719
</dd>

0 commit comments

Comments
 (0)