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

RESOLVED FIXED in 6.2

Status

enhancement
--
minor
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: MakeMyDay, Assigned: aceman)

Tracking

Dependency tree / graph

Details

Attachments

(1 attachment, 1 obsolete attachment)

12.65 KB, patch
Fallen
: review+
Details | Diff | Splinter Review
Reporter

Description

2 years ago
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
Assignee

Comment 1

Last year
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
Assignee

Comment 2

Last year
Posted patch 1438891.patch (obsolete) — Splinter Review
Attachment #8951988 - Flags: review?(philipp)
Assignee

Comment 3

Last year
Posted patch 1427481.patchSplinter Review
Right patch ;)
Attachment #8951989 - Flags: review?(philipp)
Assignee

Updated

Last year
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+
Assignee

Comment 5

Last year
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.

Comment 7

Last year
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: Last year
Keywords: checkin-needed
Resolution: --- → FIXED

Updated

Last year
Target Milestone: --- → 6.2
You need to log in before you can comment on or make changes to this bug.