Skip to content

Commit 2b8316d

Browse files
authored
Specify inputTypes handled by EditContext (#101)
Define the set of `inputType`s that will be "handled" by [Handle Input For EditContext](https://w3c.github.io/edit-context/#handle-input-for-editcontext). See also w3c/input-events#154 For normative changes, the following tasks have been completed: * [X] Editing WG resolution on the proposed changes, with at least two implementers participating and not objecting: #94 (comment) * [X] WebKit * [X] Chromium * [X] Gecko * [X] For browsers that are shipping the feature, implementation bugs are filed for the proposed changes (link to bug, or write "Implementing"/"Not Implementing"): * [X] WebKit: Not Implementing (https://bugs.webkit.org/show_bug.cgi?id=269922) * [X] Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=348590031) * [X] Gecko: Not Implementing (https://bugzilla.mozilla.org/show_bug.cgi?id=1904161) Closes #94.
1 parent e8463fc commit 2b8316d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,30 @@ <h4><dfn class="export">Handle input for EditContext</dfn></h4>
733733
</ol>
734734
</div><!-- algorithm -->
735735

736+
<h4><dfn>EditContext-handled inputType</dfn></h4>
737+
<div class="algorithm">
738+
An <a href="https://www.w3.org/TR/uievents/#dom-inputevent-inputtype">inputType</a> is an
739+
[=EditContext-handled inputType=] if it is one of the following:
740+
<ul>
741+
<li><code>insertText</code></li>
742+
<li><code>insertTranspose</code></li>
743+
<li><code>deleteWordBackward</code></li>
744+
<li><code>deleteWordForward</code></li>
745+
<li><code>deleteContent</code></li>
746+
<li><code>deleteContentBackward</code></li>
747+
<li><code>deleteContentForward</code></li>
748+
</ul>
749+
<div class="note">
750+
The <a href="https://www.w3.org/TR/uievents/#dom-inputevent-inputtype">inputType</a>s handled by {{EditContext}}
751+
are those which operate only on raw text. Other <a href="https://www.w3.org/TR/uievents/#dom-inputevent-inputtype">inputType</a>s
752+
that depend on formats, clipboard/dragdrop, undo, or browser UI like spellcheck cannot be handled by
753+
{{EditContext}} since {{EditContext}}'s state does not include these concepts. If an author wants their
754+
application to handle those <a href="https://www.w3.org/TR/uievents/#dom-inputevent-inputtype">inputType</a>s,
755+
they need to process them manually in a <a href="https://www.w3.org/TR/uievents/#event-type-beforeinput">beforeinput</a>
756+
event handler.
757+
</div>
758+
</div>
759+
736760
<h4><dfn>Update the EditContext</dfn></h4>
737761
<div class="algorithm">
738762
<dl>

0 commit comments

Comments
 (0)