-
Notifications
You must be signed in to change notification settings - Fork 10
Description
EditContext doesn't fire textupdate
for every inputType
. E.g. EditContext will fire textupdate
for "insertText"
but not for "formatBold"
. However this behavior doesn't actually seem to be in the spec.
It seems that it should be added to either the EditContext bullet point of https://w3c.github.io/input-events/#event-definitions or to https://w3c.github.io/edit-context/#dfn-handle-input-for-editcontext.
While we work this out, it would be a good time to review that we're sending the correct inputType
s to EditContext.
In the Chromium's implementation the list is:
"insertText"
"deleteContent"
·"deleteWordBackward"
"deleteWordForward"
"deleteContentBackward"
"deleteContentForward"
The intention here is that EditContext only handles changes that make sense for plain text, so things like bold/italic/underline are excluded. An interesting case to consider is that currently the Enter key is not handled by EditContext, because formatting for commands like "insertLineBreak"
or "insertParagraph"
can be nontrivial in rich text.