diff options
author | bobzel <zzzman@gmail.com> | 2024-10-28 20:08:35 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-28 20:08:35 -0400 |
commit | c45e21a8960298b77c3508b047cfbd9fdcf2c602 (patch) | |
tree | a0fabfd203267963e7a8a648ac01793b08bbdcf4 /src/client/util/DocumentManager.ts | |
parent | 8ac260db2fdffc37ff9b6e91971f287df6a70528 (diff) | |
parent | 63f9f9573dab9745d2f570e1917b325a474fdd93 (diff) |
Merge branch 'master' into alyssa-starter
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 4ab2e8d05..286112bf9 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -256,7 +256,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; - if (DocumentView.activateTabView(docContextPath[0])) options.toggleTarget = false; + let activatedTab = false; + if (DocumentView.activateTabView(docContextPath[0])) { + options.toggleTarget = false; + activatedTab = true; + } const rootContextView = docContextPath.length && @@ -268,7 +272,7 @@ export class DocumentManager { return; } options.didMove = true; - (!DocumentView.LightboxDoc() && docContextPath.some(doc => DocumentView.activateTabView(doc))) || DocumentViewInternal.addDocTabFunc(docContextPath[0], options.openLocation ?? OpenWhere.addRight); + (!DocumentView.LightboxDoc() && (activatedTab || docContextPath.some(doc => DocumentView.activateTabView(doc)))) || DocumentViewInternal.addDocTabFunc(docContextPath[0], options.openLocation ?? OpenWhere.addRight); this.AddViewRenderedCb(docContextPath[0], dv => res(dv)); })); if (options.openLocation?.includes(OpenWhere.lightbox)) { |