aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorZachary Zhang <zacharyzhang7@gmail.com>2024-03-12 16:30:43 -0400
committerZachary Zhang <zacharyzhang7@gmail.com>2024-03-12 16:30:43 -0400
commit2edfef5ac0e394cdbb8687cd3f325ff994722ef2 (patch)
treecc8209830a7f51ea0014e88a171dd36c1b9da0b3 /src/client/util/DocumentManager.ts
parent84e75f944a45c3b98ec70c75d2abc47051b10b03 (diff)
parent08c9a1fa70bcacc7dcbe103eca6209a96f00967c (diff)
Merge branch 'zach-starter' of https://github.com/brown-dash/Dash-Web into zach-starter
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 7407fa2b3..a38a330da 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -248,6 +248,11 @@ export class DocumentManager {
Doc.RemoveDocFromList(Doc.MyRecentlyClosed, undefined, targetDoc);
const docContextPath = DocumentManager.GetContextPath(targetDoc, true);
if (docContextPath.some(doc => doc.hidden)) options.toggleTarget = false;
+ const tabView = Array.from(TabDocView._allTabs).find(view => view._document === docContextPath[0]);
+ if (!tabView?._activated && tabView?._document) {
+ options.toggleTarget = false;
+ TabDocView.Activate(tabView?._document);
+ }
let rootContextView =
docContextPath.length &&
(await new Promise<DocumentView>(res => {