Closed Bug 930900 Opened 11 years ago Closed 11 years ago

KeyboardEvent.key doesn't return correct value after event dispatch finished

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Whiteboard: [qa-])

Attachments

(2 files)

The cause of this bug is, DuplicatePrivateData() sets mEventIsInternal true. Therefore, .key always returns true after the event propagation finished. We need to know whether the mKeyNameIndex stores valid value or not.

When we implement KeyboardEvent constructor, we need to add nsString mKey to WidgetKeyboardEvent for storing specified key name. For that, setting KEY_NAME_INDEX_USE_STRING to mKeyNameIndex is simple approach for distinguishing if .key should refer mKeyNameIndex or mKey.
Attachment #822329 - Flags: review?(bugs)
Replace the legacy event class names in the test file with new names.
Attachment #822333 - Flags: review?(bugs)
Attachment #822329 - Flags: review?(bugs) → review+
Comment on attachment 822333 [details] [diff] [review]
part.2 Fix event class names in test_assign_event_data.html

Mostly not about this bug, but rs=me
Attachment #822333 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/55ea77a28509
https://hg.mozilla.org/mozilla-central/rev/7f7c141390b2
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.