Re: contentEditable=minimal

On Thu, May 22, 2014 at 4:30 PM, Ben Peters <Ben.Peters@microsoft.com> wrote:
>> I.e. pressing a key on the keyboard would always fire a keyboard event, and
>> then, as default action, possibly a cursor navigation event or a text input
>> event, depending on what type of key was pressed.
>>
>> I'm unsure about what the proper way to handle text insertion is. I.e.
>> how to handle the second to last bullet.
>
> As mentioned on another mail, I think a corollary for document.execCommand('insertText') would be good. For instance, CommandEvent with type="insertText" that contains the text to be inserted.

Note that not all text handling is about inserting text. Delete and
backspace are obvious exceptions. But there's also composition
characters, which should use a different rendering.

And on mobile autocorrect of misspelled words is common, though that
can probably be handled by moving the selection to the misspelled word
and then writing the fixed word.

Though one interesting edge case there is what happens if the page
adjusts the selection as it's being moved to the word autocorrect
wants to fix?

/ Jonas

Received on Friday, 23 May 2014 10:29:32 UTC