aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2023-03-16 11:16:19 -0400
committergeireann <geireann.lindfield@gmail.com>2023-03-16 11:16:19 -0400
commita0ae93e3b14069c0de419fc5dcade84d460a0b30 (patch)
tree40a3b49fc48975be3797bcb07c96771e32bdc77b /src/client/util/DocumentManager.ts
parentab60751c36cb8cf8f87bbb9e1fe227deb3701121 (diff)
parent0e55893d0f7f2a0aa5098df73d0ece5a7f1a4ddf (diff)
Merge branch 'master' into pres-trail-sophie
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index c670d0ab8..f2c554866 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -286,7 +286,7 @@ export class DocumentManager {
docView.rootDoc.layoutKey === 'layout_icon' ? await new Promise<void>(res => docView.iconify(res)) : undefined;
docView.props.focus(docView.rootDoc, options); // focus the view within its container
const { childDocView, viewSpec } = await iterator(docView);
- if (!childDocView) return { viewSpec: viewSpec ?? docView.rootDoc, docView, contextView };
+ if (!childDocView) return { viewSpec: options.anchorDoc ?? viewSpec ?? docView.rootDoc, docView, contextView };
contextView = docView;
docView = childDocView;
}