ISSUE-142: one keydown might fire multiple keypress/textInput events

multiple keypress

one keydown might fire multiple keypress/textInput events

State:
CLOSED
Product:
HISTORICAL: DOM3 Events [All Bugs and Issues use Bugzilla: http://tinyurl.com/Bugs-DOM3Events]
Raised by:
Doug Schepers
Opened on:
2010-10-06
Description:
Hallvord R. M. Steen <http://lists.w3.org/Archives/Public/www-dom/2010JulSep/0181.html>:
[[
Spec text on keydown event
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-keydown

> if the key is associated with a character, the default action
> shall be to dispatch a textInput event with the character as
> the value of the TextEvent.data attribute

uses singular forms ('a textInput event') which doesn't take into account
that a single keydown event might cause several keypress (-> textInput)
events.

Trivial example: press a dead key twice. The default action of the second
keydown will be to fire two keypress and two text input events.

More far-fetched: use a keyboard layout where some keys are mapped to
input several characters. Chrome, Firefox and IE (on Windows) agree on
firing keydown, multiple keypress (and multiple textInput if supported),
single keyup.

Suggested text:

<li>if the key inserts one or more characters, the default action shall be
to dispatch one <a class="eventtype"
href="#event-type-textInput"><code>textInput</code></a> event for each
character inserted, with that character as the value of the <a
href="#events-TextEvent-data"><code>TextEvent.data</code></a> attribute

(Leaving aside for a moment the issue that I would also like to replace
textInput with keypress in that text..)
]]
Related Actions Items:
No related actions
Related emails:
  1. Re: ISSUE-142 (multiple keypress): one keydown might fire multiple keypress/textInput events [DOM3 Events] (from hallvord@opera.com on 2011-05-17)
  2. Re: ISSUE-142 (multiple keypress): one keydown might fire multiple keypress/textInput events [DOM3 Events] (from schepers@w3.org on 2011-05-11)
  3. Minutes, 11 May 2011 DOM3 Events Telcon (from schepers@w3.org on 2011-05-11)
  4. Minutes, DOM3 Events telcon, 04 Feb 2011 (from schepers@w3.org on 2011-02-06)
  5. ISSUE-142 (multiple keypress): one keydown might fire multiple keypress/textInput events [DOM3 Events] (from sysbot+tracker@w3.org on 2010-10-06)

Related notes:

LAST CALL

Doug Schepers, 11 Oct 2010, 17:01:47

Added wording regarding keys associated with multiple characters; tried to account for the fact that multiple keypress events might be fired, but for cases where the default is only a textinput event, it should conflate the characters into a single event (as with a paste operation).

Doug Schepers, 11 May 2011, 20:31:21

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 142.html,v 1.1 2016/01/25 10:26:15 carine Exp $