aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/LinkManager.ts
diff options
context:
space:
mode:
authorAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-08-05 19:40:00 -0700
committerAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-08-05 19:40:00 -0700
commit17e50d9e69c7d59c7d4c2be5c75c51b3e02bc698 (patch)
tree92fb6ffed0ad68260885712ad71bfa8dfa21c06b /src/client/util/LinkManager.ts
parenta5a7a94d3c52cdb230ff3d93790850329940abcf (diff)
parentde45cc09b8fe4e6231f0e568443f3c6e262f97ea (diff)
Merge branch 'master' into trails-aubrey
Diffstat (limited to 'src/client/util/LinkManager.ts')
-rw-r--r--src/client/util/LinkManager.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/LinkManager.ts b/src/client/util/LinkManager.ts
index 08f4ac9b7..8abfd740c 100644
--- a/src/client/util/LinkManager.ts
+++ b/src/client/util/LinkManager.ts
@@ -135,7 +135,8 @@ export class LinkManager {
const where = LightboxView.LightboxDoc ? "lightbox" : StrCast(sourceDoc.followLinkLocation, followLoc);
docViewProps.addDocTab(doc, where);
setTimeout(() => {
- const targDocView = DocumentManager.Instance.getFirstDocumentView(doc);
+ const getFirstDocView = LightboxView.LightboxDoc ? DocumentManager.Instance.getLightboxDocumentView : DocumentManager.Instance.getFirstDocumentView;
+ const targDocView = getFirstDocView(doc); // get first document view available within the lightbox if that's open, or anywhere otherwise.
if (targDocView) {
targDocView.props.focus(doc, {
willZoom: BoolCast(sourceDoc.followLinkZoom, false),