Last Comment Bug 711903 - EventUtils.synthesizeKey() shouldn't dispatch keypress event for modifier keys if the type isn't specified
: EventUtils.synthesizeKey() shouldn't dispatch keypress event for modifier key...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Event Handling (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla12
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 700199
  Show dependency treegraph
 
Reported: 2011-12-18 20:09 PST by Masayuki Nakano [:masayuki] (Mozilla Japan)
Modified: 2011-12-31 19:01 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part.1 EventUtils.synthesizeKey() shouldn't dispatch keypress event for modifier keys if the event type isn't specified (2.82 KB, patch)
2011-12-19 21:57 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
bugs: review+
Details | Diff | Splinter Review
Part.2 Fix new test failure (3.73 KB, patch)
2011-12-19 22:00 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
ehsan: review+
Details | Diff | Splinter Review

Description Masayuki Nakano [:masayuki] (Mozilla Japan) 2011-12-18 20:09:58 PST
EventUtils.synthesizeKey() dispatches keydown event, keypress event and keyup event if the event type isn't specified. However, widgets don't dispatch keypress event for modifier keys. Therefore, it shouldn't dispatch it.
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2011-12-19 21:57:14 PST
Created attachment 583070 [details] [diff] [review]
Part.1 EventUtils.synthesizeKey() shouldn't dispatch keypress event for modifier keys if the event type isn't specified

Do you have a better idea for the name of "isKeypressFiredKey"?
Comment 2 Masayuki Nakano [:masayuki] (Mozilla Japan) 2011-12-19 22:00:47 PST
Created attachment 583072 [details] [diff] [review]
Part.2 Fix new test failure

These tests should test the unexpected keypress events since some platforms may have the bug.

# Is it better to insert an assertion in XP level code?

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