Bug 1410360 - open about:devtools tab next to the current tab;r=ochameau draft
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 26 Oct 2017 19:07:58 +0200
changeset 689919 8afa81f0a700ddee3873e5fafc77daa39bb9dfd4
parent 689820 ee21e5f7f1c1726e0ed2697eb45df54cdceedd36
child 689920 d31509b2264a82d091cfdeacf8e889635f4a65b8
push id87151
push userjdescottes@mozilla.com
push dateWed, 01 Nov 2017 08:00:42 +0000
reviewersochameau
bugs1410360
milestone58.0a1
Bug 1410360 - open about:devtools tab next to the current tab;r=ochameau MozReview-Commit-ID: Cw0zFAeH7r2
devtools/shim/devtools-startup.js
--- 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", {});