Dismiss the measuring tool with the Escape key
Categories
(DevTools :: Inspector, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: pbro, Assigned: sebo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Bug 1600873 - [devtools] Allowed to dismiss the Measuring Tool via Escape key. r=#devtools-reviewers
48 bytes,
text/x-phabricator-request
|
Details | Review |
Dismiss the measuring tool with the Escape key.
From: https://twitter.com/bjnagel/status/1201760263612985344
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
It's very frustrating to not be able to use the browser again until I click that tiny button in the dev tools again!
Reporter | ||
Comment 2•5 years ago
|
||
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 ahighlighter-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. Thecommand-button-responsive
button is a good example as it uses asetup
andteardown
function pair to listen to events and forceonChange
updates when they occur. We should do something similar here.
- send a new event from the MeasuringTool using
Comment 3•5 years ago
|
||
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. :)
Reporter | ||
Updated•5 years ago
|
Comment 4•4 years ago
|
||
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.
Comment 5•4 years ago
|
||
Hi Matteo!
Are you still interested in fixing this bug?
Honza
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 6•3 years ago
|
||
No activity, unassigning
Honza
Updated•2 years ago
|
Assignee | ||
Comment 7•8 months ago
|
||
Updated•8 months ago
|
Description
•