RE: contentEditable=minimal

> -----Original Message-----
> From: Jonas Sicking [mailto:jonas@sicking.cc]
> 
> 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.

Sure. I believe that different types of text manipulation should fire different events. Composition Events for IMEs, CommandEvents with type insertText for all text input (including after Composition Events for IMEs), CommandEvent with type delete for that action, and ClipboardEvent with type paste for that action.

Received on Monday, 26 May 2014 23:53:18 UTC