зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1571942: Avoid to raise the toolbox whenever the shortcut key of inspector was typed. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D44772 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1a4a5cb8b9
Коммит
990e565c09
|
@ -307,7 +307,15 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
|
|||
gDevTools.emit("select-tool-command", toolId);
|
||||
} else {
|
||||
gDevTools
|
||||
.showToolbox(target, toolId, null, null, startTime)
|
||||
.showToolbox(
|
||||
target,
|
||||
toolId,
|
||||
null,
|
||||
null,
|
||||
startTime,
|
||||
undefined,
|
||||
!toolDefinition.preventRaisingOnKey
|
||||
)
|
||||
.then(newToolbox => {
|
||||
newToolbox.fireCustomKey(toolId);
|
||||
gDevTools.emit("select-tool-command", toolId);
|
||||
|
|
|
@ -490,6 +490,8 @@ DevTools.prototype = {
|
|||
* opening started. This is a `Cu.now()` timing.
|
||||
* @param {string} reason
|
||||
* Reason the tool was opened
|
||||
* @param {boolean} shouldRaiseToolbox
|
||||
* Whether we need to raise the toolbox or not.
|
||||
*
|
||||
* @return {Toolbox} toolbox
|
||||
* The toolbox that was opened
|
||||
|
@ -500,7 +502,8 @@ DevTools.prototype = {
|
|||
hostType,
|
||||
hostOptions,
|
||||
startTime,
|
||||
reason = "toolbox_show"
|
||||
reason = "toolbox_show",
|
||||
shouldRaiseToolbox = true
|
||||
) {
|
||||
let toolbox = this._toolboxes.get(target);
|
||||
|
||||
|
@ -515,7 +518,9 @@ DevTools.prototype = {
|
|||
await toolbox.selectTool(toolId, reason);
|
||||
}
|
||||
|
||||
toolbox.raise();
|
||||
if (shouldRaiseToolbox) {
|
||||
toolbox.raise();
|
||||
}
|
||||
} else {
|
||||
// As toolbox object creation is async, we have to be careful about races
|
||||
// Check for possible already in process of loading toolboxes before
|
||||
|
|
Загрузка…
Ссылка в новой задаче