Skip to content

Commit 2531aac

Browse files
authored
Allow backwards selection (#87)
As discussed in #81, the fact that EditContext prohibits a backwards selection is a source of added complexity for developers. So as resolved in the Editing WG, remove that restriction. Closes #81.
1 parent dcf8246 commit 2531aac

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h4>EditContext state</h4>
108108
<ul>
109109
<li><dfn>text</dfn> which is a {{DOMString}} representing editable content. The initial value is the empty string.</li>
110110
<li><dfn>selection start</dfn> which refers to the offset in [=text=] where the selection starts. The initial value is 0.</li>
111-
<li><dfn>selection end</dfn> which refers to the offset in [=text=] where the selection ends. The initial value is 0. [=selection end=] must always be greater than or equal to [=selection start=].</li>
111+
<li><dfn>selection end</dfn> which refers to the offset in [=text=] where the selection ends. The initial value is 0. [=selection end=] may be less than [=selection start=] in the case of a "backwards" selection (in reverse of document order).</li>
112112
<li><dfn>is composing</dfn> which indicates if there is an active composition. The initial value is false.</li>
113113
<li><dfn>composition start</dfn> which refers to the offset in [=text=] representing the start position of the text being actively composed. The initial value is 0.</p></li>
114114
<li><dfn>composition end</dfn> which refers to the offset in [=text=] representing the end position of the text being actively composed. The initial value is 0. [=composition end=] must always be greater than or equal to [=composition start=].</li>
@@ -1056,9 +1056,6 @@ <h3 id="editcontext-interface">EditContext Interface</h3>
10561056
<dd>None</dd>
10571057
</dl>
10581058
<ol>
1059-
<li>
1060-
If |start| > |end|, abort these steps.
1061-
</li>
10621059
<li>
10631060
set [=selection start=] to |start|
10641061
</li>

0 commit comments

Comments
 (0)