Open Bug 1600873 Opened 5 years ago Updated 8 months ago

Dismiss the measuring tool with the Escape key

Categories

(DevTools :: Inspector, enhancement, P5)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: pbro, Assigned: sebo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Dismiss the measuring tool with the Escape key.

From: https://twitter.com/bjnagel/status/1201760263612985344

Priority: P3 → P5

It's very frustrating to not be able to use the browser again until I click that tiny button in the dev tools again!

This might help a bit:

  • in the MeasuringTool highlighter file, we'll need to listen for the keypress event to track the Escape key
  • once that happens, it should be easy to call this.hide() I guess
  • we'll also need to let the front-end know that the tool is now hidden so the toolbar button can be toggled off too. One idea that comes to mind to do this is:
    • send a new event from the MeasuringTool using this.emit("highlighter-event", { type: "hidden-by-esc" }); or something like this. The important bit is that it's a highlighter-event event, because those ones get relayed automatically to the client-side.
    • then on the front-end side, probably in createHighlightButton, we should listen for that specific event and force an update of the button. The command-button-responsive button is a good example as it uses a setup and teardown function pair to listen to events and force onChange updates when they occur. We should do something similar here.

Thanks for the last part, I the "highlighter-event" special event type was exactly the missing link!
With that info, I should be able to make a working patch – and, I'd like to work on this bug. :)

Assignee: nobody → zer0
Status: NEW → ASSIGNED

Sorry for not updated this bug for a while, but I forget to mention that after the holidays I would leave for my honeymoon :) So, feel free to work on this or re-assign if there is someone interested before I got back!

I'll be able to work again on bugs at the end of January.

Hi Matteo!
Are you still interested in fixing this bug?

Honza

Flags: needinfo?(zer0)
Component: Inspector: Highlighters → Inspector
Flags: needinfo?(zer0)

No activity, unassigning

Honza

Assignee: zer0 → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: