Closed Bug 1427481 Opened 7 years ago Closed 7 years ago

Replace usage of KeyboardEvent.keyCode by KeyboardEvent.key in calendar

Categories

(Calendar :: General, enhancement)

enhancement
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: MakeMyDay, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

Follow-up to bug 1409560 - since KeyboardEvent.keyCode is deprecated, we should replace occurences in calendar code [1] with KeyboardEvent.key. The other deprecated properties and methods from KeyboardEvent are not present in calendar code. See [2] for how to key is working. [1] https://dxr.mozilla.org/comm-central/search?q=path%3Acalendar+.keyCode&redirect=false [2] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
There should only remain a few instances after bug 1437269, I can look at them.
Assignee: nobody → acelists
Severity: normal → minor
Depends on: 1437269
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Trunk
Attached patch 1438891.patch (obsolete) — Splinter Review
Attachment #8951988 - Flags: review?(philipp)
Attached patch 1427481.patchSplinter Review
Right patch ;)
Attachment #8951989 - Flags: review?(philipp)
Attachment #8951988 - Attachment is obsolete: true
Attachment #8951988 - Flags: review?(philipp)
Comment on attachment 8951989 [details] [diff] [review] 1427481.patch Review of attachment 8951989 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for working on this patch, r=philipp. Two minor nits: ::: calendar/base/content/dialogs/calendar-alarm-dialog.xul @@ +22,5 @@ > persist="screenX screenY width height" > onload="setupWindow(); window.arguments[0].wrappedJSObject.window_onLoad();" > onunload="finishWindow();" > onfocus="onFocusWindow();" > + onkeypress="if (event.key == 'Escape') { window.close(); }" double quotes please ::: calendar/lightning/content/messenger-overlay-sidebar.xul @@ +302,5 @@ > oncommand="openInvitationsDialog()"> > <label id="calendar-invitations-label" > class="text-link" > onclick="openInvitationsDialog()" > + onkeypress="if (event.key == 'Enter') { openInvitationsDialog(); }"/> double quotes please
Attachment #8951989 - Flags: review?(philipp) → review+
Those two are inside attribute value so we have to use single quotes there. Unless there is another way to do it.
Status: NEW → ASSIGNED
Keywords: checkin-needed
Ignore previous double quote comments, obviously not sensible in an attribute.
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/cf8afa5f2ce8 convert remaining event.keyCode uses in calendar. r=philipp
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: