Bug 1410360 - open about:devtools tab next to the current tab;r=ochameau
MozReview-Commit-ID: Cw0zFAeH7r2
--- a/devtools/shim/devtools-startup.js
+++ b/devtools/shim/devtools-startup.js
@@ -527,17 +527,19 @@ DevToolsStartup.prototype = {
return;
}
}
let url = "about:devtools";
if (reason) {
url += "?reason=" + encodeURIComponent(reason);
}
- gBrowser.selectedTab = gBrowser.addTab(url);
+
+ // Set relatedToCurrent: true to open the tab next to the current one.
+ gBrowser.selectedTab = gBrowser.addTab(url, {relatedToCurrent: true});
},
handleConsoleFlag: function (cmdLine) {
let window = Services.wm.getMostRecentWindow("devtools:webconsole");
if (!window) {
let require = this.initDevTools("CommandLine");
let { HUDService } = require("devtools/client/webconsole/hudservice");
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});