Skip to content

Commit

Permalink
Bug 1491874: Keep the shortcut key consistency of during picker mode.…
Browse files Browse the repository at this point in the history
… r=pbro

Differential Revision: https://phabricator.services.mozilla.com/D40379

--HG--
extra : moz-landing-system : lando
  • Loading branch information
dadaa committed Aug 7, 2019
1 parent 5041bdc commit 9aaf57a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion devtools/client/framework/toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,9 @@ Toolbox.prototype = {
* gets the focus.
*/
_onPickerCanceled: function() {
this.win.focus();
if (this.hostType !== Toolbox.HostType.WINDOW) {
this.win.focus();
}
},

/**
Expand Down
6 changes: 4 additions & 2 deletions devtools/server/actors/highlighters.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,11 @@ exports.HighlighterActor = protocol.ActorClassWithSpec(highlighterSpec, {
this._walker.emit("picker-node-canceled");
return;
case event.DOM_VK_C:
const { altKey, ctrlKey, metaKey, shiftKey } = event;

if (
(IS_OSX && event.metaKey && event.altKey) ||
(!IS_OSX && event.ctrlKey && event.shiftKey)
(IS_OSX && metaKey && altKey | shiftKey) ||
(!IS_OSX && ctrlKey && shiftKey)
) {
this.cancelPick();
this._walker.emit("picker-node-canceled");
Expand Down

0 comments on commit 9aaf57a

Please sign in to comment.