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

Re: textInput --> beforeInput

From: James Su <suzhe@google.com>
Date: Mon, 21 Jun 2010 15:24:49 -0700
Message-ID: <AANLkTilYbkFeFxFRhdEXucwlvHnkXz7qcS8I8H8GT5Bw@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: www-dom@w3.org, tony@chromium.org, morrita@google.com, danilatos@google.com, rolandsteiner@chromium.org
According to the current DOM Level 3 Event Specification, the textInput
event is only for inserting text, deleting text is not covered. And IMHO,
using the name 'xxxInput' for deleting action is confusing. Can we have a
better name for this purpose? For example "beforeTextChange"?

在 2010年6月16日 下午5:29,Ojan Vafai <ojan@chromium.org>写道:

> The textInput event should be expanded to include all user-input that
> modifies the DOM. This would match the existing "input" event and make the
> event much more useful. It could then be a catchall event that happens
> before any user-modifications. Basically I'm proposing that:
> 1. We add every possible user-action to the list of InputModes (e.g. cut,
> paste, undo, redo, etc.).
> 2. We rename textInput to beforeInput.
> 3. We not fire this event for script operations (matches the existing
> "input" event, is easier to implement and meets all the use-cases that I can
> think of).
I'm thinking about a possible use case: Javascript based input method, such
as Google transliteration service. Such kind of input methods usually can be
used on any web pages as bookmarklets. They may intercept keyboard events
and fake text input events.

> Currently, only WebKit implements textInput. It does not yet implement the
> inputMode property. I expect that renaming (or at least aliasing) textInput
> to beforeInput would not be controversial.
> Nit: I don't much like "inputMode" as a name. Really it's the user-action
> that it's referring to. I'd rather see inputMode renamed to action, but I
> won't be too upset if we leave it as inputMode.
> Ojan
Received on Monday, 21 June 2010 22:25:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:16 UTC