From afb4e4ff02a5e1553c443ac58b1d3d5b2f08ee35 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:08:43 +0200 Subject: [PATCH] gh-14242: Fixed space routing overriding user set containers (gh-14245) --- .../tabbrowser/content/tabbrowser-js.patch | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index 838a4ceb2..3fb2d5bd7 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d642a5b0a04 100644 +index 08b5b56e069d038d72c87355920c4ce8a55ed805..555ffd4772d9d4903491fdff9f3682852f8a52bd 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -511,6 +511,7 @@ @@ -14,9 +14,6 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64 return this.tabContainer.visibleTabs; } -- get pinnedTabCount() { -- for (var i = 0; i < this.tabs.length; i++) { -- if (!this.tabs[i].pinned) { + zenHandleTabMove(...args) { + return this.#handleTabMove(...args); + } @@ -31,15 +28,15 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64 + continue; + } + if (!item.pinned && !item.hasAttribute("zen-glance-tab")) { - break; - } ++ break; ++ } + if (item.visible) { + i += !item.hasAttribute("zen-glance-tab"); + } - } - return i; - } - ++ } ++ return i; ++ } ++ + ungroupTabsUntilNoActive(tab) { + if (!tab || !tab.group) return; + const activeGroups = tab.group.activeGroups; @@ -62,17 +59,19 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64 + return i; + } + -+ get pinnedTabCount() { + get pinnedTabCount() { +- for (var i = 0; i < this.tabs.length; i++) { +- if (!this.tabs[i].pinned) { + let i = 0; + for (let tab of this.tabs) { + if (!tab.pinned && !tab.hasAttribute("zen-glance-tab")) { -+ break; -+ } + break; + } + i += !tab.hasAttribute("zen-glance-tab"); -+ } -+ return i; -+ } -+ + } + return i; + } + + get tabsWithoutGlance() { + return this.tabs.filter(tab => !tab.hasAttribute("zen-glance-tab")); + } @@ -297,7 +296,7 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..fff7da6865c694b439ee12d05db06d64 + + let hasZenDefaultUserContextId = false; + let zenForcedWorkspaceId = undefined; -+ if (beforeRouteResult.isRouteFound) { ++ if (beforeRouteResult.isRouteFound && typeof userContextId !== "undefined") { + userContextId = beforeRouteResult.userContextId; + hasZenDefaultUserContextId = true; + } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {