W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2010

Re: Proposal to ammend the composition event spec.

From: Ojan Vafai <ojan@chromium.org>
Date: Wed, 16 Jun 2010 17:58:15 -0700
Message-ID: <AANLkTilzU1hsYdNvw9-D00oXf1qFSdW7wfmtn16Wchax@mail.gmail.com>
To: James Su <suzhe@google.com>
Cc: Hironori Bono (坊野 博典) <hbono@google.com>, Daniel Danilatos <daniel@danilatos.com>, www-dom@w3.org
On Wed, Jun 16, 2010 at 2:38 PM, Ojan Vafai <ojan@chromium.org> wrote:

> to type "wo" -> 我
>
> user "w"  <-- Canceling keydown should prevent the composition from
> starting and the DOM should not be modified.
>

Upon further thought, I think we should also fire a textInput event here
(not sure if it should fire before or after compositionstart). "data" can
just be the empty string. It should be possible to only listen to textInput
and preventDefault to prevent all text insertion. You shouldn't need to
listen to both textInput and keydown/compositionstart.


> event compositionstart
> ("w")
>
> user "o"  <-- Not related to textInput since this keydown doesn't generate
> a textInput event. One cross-platform solution would be to cancel the
> composition.
> ("wo")
>
> user <space>  <-- Same as above.
> ("我")
>
> user <space> (to commit the composition) <-- Should cancel the textInput
> and thus cancel the composition.
>
> ("")
> event textInput (cancelable)
> ("我")
> event compositionend
>
> -Ojan
>
>
Received on Thursday, 17 June 2010 00:59:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT