Skip to content

Commit cb7b93e

Browse files
committed
update deactivate timing
1 parent 1b12ed5 commit cb7b93e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -696,23 +696,23 @@ <h3>Extensions to the HTMLElement interface</h3>
696696
<ol>
697697
<li>If |editContext|'s <a>associated element</a> is equal to [=this=], then terminate these steps.</li>
698698
<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>
700699
</ol>
701700
</li>
702701
<li>Let |oldEditContext| be the value of [=this=]'s internal [[\EditContext]] slot.</li>
702+
<li>
703+
If |oldEditContext| is not null and |oldEditContext| is [=this=]'s
704+
<a href="https://dom.spec.whatwg.org/#concept-node-document">node document</a>'s
705+
[=active EditContext=], then run the steps to [=deactivate an EditContext=]
706+
with |oldEditContext|.
707+
</li>
708+
<li>If |editContext| is not null, then set |editContext|'s <a>associated element</a> to [=this=].
703709
<li>If |oldEditContext| is not null, then:
704710
<ol>
705711
<li>[=Assert=]: |oldEditContext|'s <a>associated element</a> is equal to [=this=].</li>
706712
<li>Set |oldEditContext|'s <a>associated element</a> to null.</li>
707713
</ol>
708714
</li>
709715
<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>
716716
</ol>
717717
</div><!-- algorithm -->
718718
</dd>

0 commit comments

Comments
 (0)