aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorsharkiecodes <lanyi_stroud@brown.edu>2025-06-10 11:12:23 -0400
committersharkiecodes <lanyi_stroud@brown.edu>2025-06-10 11:12:23 -0400
commit272534c8a7517d08c70928c96d487d84b14772f6 (patch)
tree0e3e9a8cc83b8ba96b2bd49c9fc726b16411d60c /src/client/util/DocumentManager.ts
parentc5981504058e0696827b4048fcd908a58fb0b0d3 (diff)
parentb91057d00512446339e48fb8488a97a1e5ef03d5 (diff)
Merge branch 'master' into lanyi-branch
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index fc8f22cf3..1c2ffab1b 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -250,7 +250,7 @@ export class DocumentManager {
const options = optionsIn;
Doc.MyRecentlyClosed && Doc.RemoveDocFromList(Doc.MyRecentlyClosed, undefined, targetDoc);
const docContextPath = DocumentManager.GetContextPath(targetDoc, true);
- if (docContextPath.some(doc => doc.hidden)) options.toggleTarget = false;
+ if (docContextPath.some(doc => doc !== targetDoc && doc.hidden)) options.toggleTarget = false;
let activatedTab = false;
if (DocumentView.activateTabView(docContextPath[0])) {
options.toggleTarget = false;
@@ -274,6 +274,7 @@ export class DocumentManager {
// even if we found the document view, if the target is a lightbox, we try to open it in the lightbox to preserve lightbox semantics (eg, there's only one active doc in the lightbox)
const target = DocCast(targetDoc.annotationOn, targetDoc)!;
const compView = this.getDocumentView(DocCast(target.embedContainer))?.ComponentView;
+ options.didMove = target.hidden || options.didMove ? true : false;
if ((compView?.addDocTab ?? compView?._props.addDocTab)?.(target, options.openLocation)) {
await new Promise<void>(waitres => {
setTimeout(() => waitres());