mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 18:24:02 +00:00
Bug 1824725 - [devtools] Avoid focusing the webconsole when enabling the JS Tracer. r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D174873
This commit is contained in:
parent
c75338571f
commit
1cb5a67ab2
@ -23,7 +23,7 @@ export function toggleTracing(logMethod) {
|
||||
|
||||
// Automatically open the split console when enabling tracing to the console
|
||||
if (!isTracingEnabled && logMethod == "console") {
|
||||
await panel.toolbox.openSplitConsole();
|
||||
await panel.toolbox.openSplitConsole({ focusConsoleInput: false });
|
||||
}
|
||||
|
||||
return dispatch({
|
||||
|
@ -2971,10 +2971,14 @@ Toolbox.prototype = {
|
||||
/**
|
||||
* Opens the split console.
|
||||
*
|
||||
* @param {boolean} focusConsoleInput
|
||||
* By default, the console input will be focused.
|
||||
* Pass false in order to prevent this.
|
||||
*
|
||||
* @returns {Promise} a promise that resolves once the tool has been
|
||||
* loaded and focused.
|
||||
*/
|
||||
openSplitConsole() {
|
||||
openSplitConsole({ focusConsoleInput = true } = {}) {
|
||||
this._splitConsole = true;
|
||||
Services.prefs.setBoolPref(SPLITCONSOLE_ENABLED_PREF, true);
|
||||
this._refreshConsoleDisplay();
|
||||
@ -2992,7 +2996,9 @@ Toolbox.prototype = {
|
||||
width: Math.ceil(this.win.outerWidth / 50) * 50,
|
||||
});
|
||||
this.emit("split-console");
|
||||
this.focusConsoleInput();
|
||||
if (focusConsoleInput) {
|
||||
this.focusConsoleInput();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user