Bug 1353428 - Add option to open new tabs always next to the current one. r=IanN a=IanN
authorbblack <bschwarze@t-online.de>
Sun, 02 Sep 2018 20:27:49 +0200
changeset 28292 7bf4aec57fa4
parent 28291 d8f1d84f6864
child 28293 cd3f2bafbff8
push id2119
push userfrgrahl@gmx.net
push dateSun, 02 Sep 2018 18:30:18 +0000
treeherdercomm-esr52@7bf4aec57fa4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1353428
Bug 1353428 - Add option to open new tabs always next to the current one. r=IanN a=IanN
suite/browser/browser-prefs.js
suite/browser/tabbrowser.xml
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -239,16 +239,17 @@ pref("browser.tabs.tooltippreview.width"
 pref("browser.tabs.autoHide", true);
 pref("browser.tabs.forceHide", false);
 pref("browser.tabs.closeWindowWithLastTab", true);
 pref("browser.tabs.warnOnClose", true);
 pref("browser.tabs.warnOnCloseOther", true);
 pref("browser.tabs.warnOnOpen", true);
 pref("browser.tabs.maxOpenBeforeWarn", 15);
 pref("browser.tabs.insertRelatedAfterCurrent", true);
+pref("browser.tabs.insertAllTabsAfterCurrent", false);
 // 0 = append, 1 = replace
 pref("browser.tabs.loadGroup", 1);
 
 // how many browsers can be saved in the DOM (by the tabbed browser)
 pref("browser.tabs.max_tabs_undo", 3);
 // should popups by saved in the DOM (by the tabbed browser)
 pref("browser.tabs.cache_popups", false);
 
--- a/suite/browser/tabbrowser.xml
+++ b/suite/browser/tabbrowser.xml
@@ -1671,17 +1671,18 @@
             t.dispatchEvent(new Event("TabOpen",
               { bubbles: true, cancelable: false }));
 
             // Check if we're opening a tab related to the current tab and
             // move it to after the current tab.
             // aReferrerURI is null or undefined if the tab is opened from
             // an external application or bookmark, i.e. somewhere other
             // than the current tab.
-            if ((aRelatedToCurrent || aReferrerURI) &&
+            if ((aRelatedToCurrent || aReferrerURI ||
+                 this.mPrefs.getBoolPref("browser.tabs.insertAllTabsAfterCurrent")) &&
                 this.mPrefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) {
               var lastRelatedIndex = this.mLastRelatedIndex ||
                                      this.tabContainer.selectedIndex;
               this.moveTabTo(t, ++lastRelatedIndex);
               this.mLastRelatedIndex = lastRelatedIndex;
             }
 
             if (aFocusNewTab) {