ISSUE-140: textInput event as default action of both keydown and keypress?
textInput keydown keypress
textInput event as default action of both keydown and keypress?
- 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/0179.html>:
[[
spec currently says about keydown event:
> 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
and about the keypress event (in the table):
> Default action Varies: textInput event;
So an implementation that follows this spec to the T might end up firing
textInput twice for all input, once as the default action of keydown and
once as the default action of keypress..
What implementations actually do (and current web content requires) is to
fire *keypress* as the default action of the keydown event. Then the
keypress event's default action is to fire textInput.
I suggest fixing the spec to say keydown's default action is a keypress
event.
(Firefox has a small quirk that the spec IMO can ignore in that
preventDefault() on keydown doesn't actually prevend the keypress event
from firing - but it fires "pre-cancelled". At some point in time, some
legacy content required this behaviour - but other browsers align on
making keypress entirely preventable.)]] - Related Actions Items:
- No related actions
- Related emails:
- Minutes, DOM3 Events telcon, 04 Feb 2011 (from schepers@w3.org on 2011-02-06)
- ISSUE-140 (textInput keydown keypress): textInput event as default action of both keydown and keypress? [DOM3 Events] (from sysbot+tracker@w3.org on 2010-10-06)
Related notes:
LAST CALL
Doug Schepers, 11 Oct 2010, 17:01:19This was covered by Revision 1.163 for ISSUE-169.
Jacob Rossi, 21 Apr 2011, 23:53:31Display change log