mirror of
https://github.com/zen-browser/desktop.git
synced 2026-06-13 15:03:41 +00:00
gh-14117: Fixed incorrect tab routing container checks (gh-14128)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 43fb79a3060e20f671ae6ffc26350c7abf497702..f4a5daa70374bbf7b3f42a6023b346dccad2a0be 100644
|
||||
index 43fb79a3060e20f671ae6ffc26350c7abf497702..68a037d5a0e3416f31ffcb163592f008ede72076 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -502,6 +502,7 @@
|
||||
@@ -296,7 +296,7 @@ index 43fb79a3060e20f671ae6ffc26350c7abf497702..f4a5daa70374bbf7b3f42a6023b346dc
|
||||
+
|
||||
+ let hasZenDefaultUserContextId = false;
|
||||
+ let zenForcedWorkspaceId = undefined;
|
||||
+ if (beforeRouteResult.userContextId) {
|
||||
+ if (beforeRouteResult.isRouteFound) {
|
||||
+ userContextId = beforeRouteResult.userContextId;
|
||||
+ hasZenDefaultUserContextId = true;
|
||||
+ } else if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
|
||||
|
||||
@@ -2290,6 +2290,11 @@ class nsZenWorkspaces {
|
||||
}
|
||||
|
||||
onBeforeTabSelect(aTab) {
|
||||
if (this.#inChangingWorkspace) {
|
||||
// Just in case, Let's not do these checks while we are
|
||||
// in the middle of changing workspace,
|
||||
return false;
|
||||
}
|
||||
const tabSpace = aTab?.getAttribute("zen-workspace-id");
|
||||
if (
|
||||
tabSpace &&
|
||||
@@ -2297,11 +2302,9 @@ class nsZenWorkspaces {
|
||||
!aTab.hasAttribute("zen-empty-tab") &&
|
||||
!aTab.hasAttribute("zen-essential")
|
||||
) {
|
||||
this.changeWorkspaceWithID(tabSpace)
|
||||
.catch(console.error)
|
||||
.then(() => {
|
||||
gBrowser.selectedTab = aTab;
|
||||
});
|
||||
this.lastSelectedWorkspaceTabs[tabSpace] =
|
||||
gZenGlanceManager.getTabOrGlanceParent(aTab);
|
||||
this.changeWorkspaceWithID(tabSpace);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user