Bug 1491874: Keep the shortcut key consistency of during picker mode. r=pbro

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daisuke Akatsuka 2019-08-07 02:07:21 +00:00
Родитель 5041bdc10b
Коммит 9aaf57a4e2
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1802,7 +1802,9 @@ Toolbox.prototype = {
* gets the focus.
*/
_onPickerCanceled: function() {
this.win.focus();
if (this.hostType !== Toolbox.HostType.WINDOW) {
this.win.focus();
}
},
/**

Просмотреть файл

@ -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");