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

RE: contentEditable=minimal

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Tue, 27 May 2014 17:22:20 +0000
To: Robin Berjon <robin@w3.org>, Ben Peters <Ben.Peters@microsoft.com>, "Julie Parent" <jparent@gmail.com>, "garykac@google.com" <garykac@google.com>, "masayuki@d-toybox.com" <masayuki@d-toybox.com>
CC: Johannes Wilm <johannes@fiduswriter.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <468fd572bcfc470e9b4fa03c0800d265@BLUPR03MB344.namprd03.prod.outlook.com>
+Gary and Masayuki

--This seems very related to the discussion we are having regarding when to fire "beforeinput". "beforeinput" might be duplicating some of the use-cases that the insertText command event might be supporting.

-----Original Message-----
From: Robin Berjon [mailto:robin@w3.org] 
Sent: Tuesday, May 27, 2014 2:39 AM
To: Ben Peters; Julie Parent
Cc: Johannes Wilm; public-webapps@w3.org
Subject: Re: contentEditable=minimal

On 27/05/2014 01:52 , Ben Peters wrote:
>> From: Robin Berjon [mailto:robin@w3.org] On 23/05/2014 01:23 , Ben
>> Peters wrote:
>>>> As I said I am unsure that the way in which composition events
>>>> are described in DOM 3 Events is perfect, but that's only
>>>> because I haven't used them in anger and they aren't supported
>>>> much.
>>> My thought is that we can use CommandEvent with
>>> type="insertText". This would be the corollary to
>>> execComamnd("insertText"), and the data would be the ñ that is
>>> about to be inserted.
>> But if you only get one event you can't render the composition as
>> it is carrying out.
> I believe Composition Events are very important for IME input, but we
> should fire CommandEvent with Insert text for all text input,
> including IME. Are you saying we should use Composition Events even
> for non-IME input?

I am not using an IME, and yet I could not type in French on my keyboard 
without composition.

Obviously, if I switch to Kotoeri input, I'll get composition *and* an 
IME popup. But for regular French input (in a US keyboard) I need:

   é -> Alt-E, E
   è -> Alt-`, E
   à -> Alt-`, A
   ô -> Alt-I, O
   ü -> Alt-U, U
   ñ -> Alt-˜, N (for the occasional Spanish)
   (and a bunch more)

Some older apps (you pretty much can't find them anymore) used to not 
display the composition as it was ongoing and only show the text after 
composition had terminated. That was survivable but annoying, and it 
only worked because composition in Latin-script languages is pretty 
trivial (except perhaps for all you Livonian speakers out there!), but I 
don't think it would be viable for more complex compositions. And even 
in simple cases it would confuse users to be typing characters with no 
rendering feedback.

Without composition events you can't render the ongoing composition. See 
what's going on at:


That is basically inserting text in a range that's decorated to be 
underlined to show composition in progress. Composition updates 
*replace* the text in the range. And at the end the range is removed and 
text is inserted.

The above is for Mac, but I have distant memories of using something 
similar on Windows called the "US International Keyboard" where you 
could have apostrophes compose as accents, etc.. I don't recall how it 
was rendered though.

Robin Berjon - http://berjon.com/ - @robinberjon

Received on Tuesday, 27 May 2014 17:22:51 UTC

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