W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

RE: contentEditable=minimal

From: Ben Peters <Ben.Peters@microsoft.com>
Date: Mon, 26 May 2014 23:52:50 +0000
To: Jonas Sicking <jonas@sicking.cc>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <21d4b0cad243418f93c234bbaa75bc80@BLUPR03MB437.namprd03.prod.outlook.com>
> -----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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC