The default bug view has changed. See this FAQ.

EventUtils.synthesizeKey() shouldn't dispatch keypress event for modifier keys if the type isn't specified

RESOLVED FIXED in mozilla12

Status

()

Core
Event Handling
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
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"?
Attachment #583070 - Flags: review?(bugs)
(Assignee)

Comment 2

5 years ago
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?
Attachment #583072 - Flags: review?(ehsan)

Updated

5 years ago
Attachment #583072 - Flags: review?(ehsan) → review+
Attachment #583070 - Flags: review?(bugs) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9877c56df1a3
https://hg.mozilla.org/integration/mozilla-inbound/rev/eabdc8f1c344
Whiteboard: [inbound]
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/9877c56df1a3
https://hg.mozilla.org/mozilla-central/rev/eabdc8f1c344
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.