diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-03-12 16:14:58 -0400 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-03-12 16:14:58 -0400 |
commit | 2d9763a63a661420ae0ffa8b4436b29ed717b90b (patch) | |
tree | 4c3623c87a6e4e184d06579569fb239cfbad3dc1 /src/client/util/DocumentManager.ts | |
parent | ecfb0d119e08a101cd8d18e8a90d31995f71eeec (diff) | |
parent | 641220e9cd9626af182118f84f8f775d7638cc67 (diff) |
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 5 |
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 => { |