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

Composition events (was: contentEditable=minimal)

From: Robin Berjon <robin@w3.org>
Date: Tue, 27 May 2014 11:15:18 +0200
Message-ID: <538457A6.1040509@w3.org>
To: Ben Peters <Ben.Peters@microsoft.com>, Jonas Sicking <jonas@sicking.cc>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
On 27/05/2014 01:52 , Ben Peters wrote:
> Composition Events for IMEs, CommandEvents with type insertText for
> all text input (including after Composition Events for IMEs)

I think we should be careful not to mix up composition events and IMEs. 
They may happen together, but IMEs have their own specific issues (e.g. 
popping up a window) that inline composition does not necessarily have. 
Also, IMEs can happen without composition: you could arguably popup a 
handwriting IME that would just insert text on commit without any 
composition taking place.

To stick to what I think is the simplest case, diacritic composition, 
here is what I believe the current D3E specification says (not that it's 
really clear on the matter, but I'm assuming best case scenario). For  
you basically get:

   compositionstart ""
   compositionend ""

 From what you're saying above you'd like to replace that with:

   compositionstart ""
   input ""

I think we can make that work, it drops on event and moves the code 
around. If you look at the "Twitter Box" code:


It basically would need to move what's in the compositionend handler 
inside the beforeinput handler, with a check to see if compoRange exists 
(or the event has isComposing=true).

(I'm assuming that compositionupdate stays as is since we need to update 
the rendering with it.)

Is that the sort of flow you had in mind?

PS: note I just noticed that the code in the Gist was not the latest I 
had and had a lot of "TODO" bits  I've udpated it to the latest.

Robin Berjon - http://berjon.com/ - @robinberjon
Received on Tuesday, 27 May 2014 09:15:30 UTC

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