textInput --> beforeInput

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).

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 Thursday, 17 June 2010 00:30:39 UTC