Last Comment Bug 602812 - Inconsistency whether keypress event is dispatched or not of CapsLock, NumLock and ScrollLock keys
: Inconsistency whether keypress event is dispatched or not of CapsLock, NumLoc...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
Mentors:
Depends on:
Blocks: 577630
  Show dependency treegraph
 
Reported: 2010-10-08 01:55 PDT by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2013-08-10 00:16 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2010-10-08 01:55:06 PDT
When I write a document (https://developer.mozilla.org/en/DOM/Event/UIEvent/KeyEvent#Order_of_key_events), I found an inconsistency issue across platforms.

On Windows, CapsLock, NumLock and ScrollLock don't dispatch keypress event.

On Linux, CapsLock, NumLock and ScrollLock dispatch keypress event.

On Mac, CapsLock dispatches only keydown event, NumLock key (without Fn key, i.e., external keyboard's NumLock key) dispatches keydown, keypress and keyup events. NumLock key with Fn key and ScrollLock key don't dispatch any key events.

The CapsLock of Mac doesn't send keyup event is a limitation of platform. I'm not sure the ScrollLock on Mac. But that isn't a matter of this bug.

The main issue of this bug is whether we should dispatch keypress event for these keys or not.

The keys don't generate any characters, so, we shouldn't dispatch keypress event at that time.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#event-type-keypress
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2012-08-29 02:27:54 PDT
Note that NumLock key has been obsoleted on Mac. Please ignore the NumLock issue on Mac mentioned in the comment 0.
Comment 2 Masayuki Nakano [:masayuki] (Mozilla Japan) 2013-07-23 11:04:32 PDT
This was completely fixed by other bugs.

Note You need to log in before you can comment on or make changes to this bug.