# HG changeset patch # User bblack # Date 1623162001 14400 # Parent 37fc358ffefff20d3a8bf0b0d35be34a485e8048 Bug 1353428 - Add option to open new tabs always next to the current one. diff --git a/suite/browser/browser-prefs.js b/suite/browser/browser-prefs.js --- a/suite/browser/browser-prefs.js +++ b/suite/browser/browser-prefs.js @@ -238,16 +238,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); // For future use pref("browser.tabs.loadBookmarksInBackground", false); // how many browsers can be saved in the DOM (by the tabbed browser) pref("browser.tabs.max_tabs_undo", 3); diff --git a/suite/browser/tabbrowser.xml b/suite/browser/tabbrowser.xml --- a/suite/browser/tabbrowser.xml +++ b/suite/browser/tabbrowser.xml @@ -1677,17 +1677,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) {