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: Tue, 18 May 2010 09:51:11 -0700
Message-ID: <AANLkTilszs8lyZ1SmZ-gThv8H_9KolrR9UxtXWe036e9@mail.gmail.com>
To: Doug Schepers <schepers@w3.org>
Cc: Daniel Danilatos <daniel@danilatos.com>, www-dom@w3.org
On Tue, May 18, 2010 at 9:11 AM, Doug Schepers <schepers@w3.org> wrote:

> In my opinion, the spec should be changed to match the implementation
> experience, and I expect that others will agree.  The DOM3 Events spec is
> not (quite) in Last Call yet, so it's not a question of maintaining
> compatibility with the spec, but rather in doing what works best for
> implementations and authors.
>

I agree.


> I'm not opposed to option 3, but it doesn't seem to take into account the
> fact that some IMEs swallow all key events, so the result of the composition
> isn't available until the end.  Or maybe I'm misunderstanding it?
>

Option 3 seems best to me. The UA always knows before it modifies the DOM,
so it can ensure that textInput fires before the DOM is modified. It might
be that the result of the full composition isn't available until the end,
but the UA certainly knows about any state changes to the DOM before they
happen. Stated differently, textInput does not need to fire due to internal
state changes in the IME, but should fire due to changes to the DOM.

However, it may be that canceling a textInput event during a composition
will do strange things. I think that's fine. In the worst case, we can say
either of the following:

   - textInput events during IME composition cannot be canceled
   - textInput events during IME composition can be cancelled, but may leave
   the composition in an indeterminate state

It's not ideal, but at least it keeps textInput consistent by making it
always fire before any text is input, which is more important.

Ojan
Received on Tuesday, 18 May 2010 16:52:03 GMT

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