Use keydown instead of keypress to trigger display of the debugging panel

RESOLVED FIXED in Firefox 60

Status

()

enhancement
P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: sfoster, Assigned: sfoster)

Tracking

Trunk
Firefox 60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

(Whiteboard: [webpayments])

Attachments

(1 attachment)

Bug 1440189 removes the dispatch of keypress events for non-printable characters (such as the ctrl+alt+d sequence we use to show the debugging panel), and recommends using keydown instead for these cases.
Comment hidden (mozreview-request)
Comment on attachment 8955620 [details]
Bug 1442724 - Use keydown to trigger display of payments debugging panel.

https://reviewboard.mozilla.org/r/224720/#review230736

::: toolkit/components/payments/res/paymentRequest.js:36
(Diff revision 1)
> -      case "keypress": {
> +      case "keydown": {
>          if (event.code != "KeyD" || !event.altKey || !event.ctrlKey) {
>            break;
>          }

If you've manually tested that this works then r=me. I thought that event.code may differ with keydown but I'm not sure.
Attachment #8955620 - Flags: review?(MattN+bmo) → review+
Assignee

Comment 3

a year ago
mozreview-review
Comment on attachment 8955620 [details]
Bug 1442724 - Use keydown to trigger display of payments debugging panel.

https://reviewboard.mozilla.org/r/224720/#review230738

::: toolkit/components/payments/res/paymentRequest.js:36
(Diff revision 1)
> -      case "keypress": {
> +      case "keydown": {
>          if (event.code != "KeyD" || !event.altKey || !event.ctrlKey) {
>            break;
>          }

Yeah, this works fine.

Comment 4

a year ago
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26fcec5f5ee4
Use keydown to trigger display of payments debugging panel. r=MattN

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/26fcec5f5ee4
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Assignee: nobody → sfoster
Priority: -- → P1
Whiteboard: [webpayments]
Component: WebPayments UI → WebPayments UI
Product: Toolkit → Firefox
Target Milestone: mozilla60 → Firefox 60
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.