Re: textInput --> beforeInput

Hi, Jonas-

Jonas Sicking wrote (on 8/27/10 5:20 PM):
> On Fri, Aug 27, 2010 at 2:17 PM, Doug Schepers<schepers@w3.org>  wrote:
>>>  2. Fire beforeInput for any user-action that modifies the DOM, not just
>>>  actions that cause text to get inserted.
>>
>>  That's more like a mutation event, not a 'textInput' event, and mutation
>>  events are pretty widely reviled by implementers (though useful when
>>  implemented); they seem to be difficult to implement efficiently.  We have
>>  deprecated Mutation Events in DOM3 Events, though there are still going to
>>  be implementations for a while.
>
> What counts as "any user-action" here? If we're talking about things
> like copy-paste and drag'n'drop then it won't have any of the problems
> that mutations events have.

(Copy-)Paste and (Drag'n')Drop are already covered by the 'textInput' 
event, explicitly [1].  Here's a list of the possible options for the 
.inputMethod property:

  DOM_INPUT_METHOD_UNKNOWN
  DOM_INPUT_METHOD_KEYBOARD
  DOM_INPUT_METHOD_PASTE
  DOM_INPUT_METHOD_DROP
  DOM_INPUT_METHOD_IME
  DOM_INPUT_METHOD_OPTION
  DOM_INPUT_METHOD_HANDWRITING
  DOM_INPUT_METHOD_VOICE
  DOM_INPUT_METHOD_MULTIMODAL
  DOM_INPUT_METHOD_SCRIPT

Neither copying nor dragging themselves input text, only the end results 
of those "paired" operations, the pasting and dropping.

My conclusion is that Ojan must be talking about extending this beyond 
text and beyond simple insertion.  I am reluctant to change it so 
dramatically at this late stage, but am always willing to listen to 
implementation experience.


[1] 
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-textevents

Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs

Received on Friday, 27 August 2010 21:43:43 UTC