aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-08 19:34:18 -0400
committerbobzel <zzzman@gmail.com>2022-06-08 19:34:18 -0400
commit3fcb141913c095e0bdee8874431a51cafe086e3a (patch)
treee9fb48b34063e2ceaaa65bbaf41f197d61a4f38b /src/client/views/linking
parent2e42d66be1439de347305cfd43c6f7e7042127c6 (diff)
parent94975954fbd1ce9b68f6545b16a4eabe4b41cca0 (diff)
merge with master
Diffstat (limited to 'src/client/views/linking')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 3ddcf803d..a75e7a0c4 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -102,6 +102,10 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
this.props.itemHandler?.(this.props.linkDoc);
} else {
+ const focusDoc = Cast(this.props.linkDoc.anchor1, Doc, null)?.annotationOn === this.props.sourceDoc ? Cast(this.props.linkDoc.anchor1, Doc, null) :
+ Cast(this.props.linkDoc.anchor2, Doc, null)?.annotationOn === this.props.sourceDoc ? Cast(this.props.linkDoc.anchor12, Doc, null) : undefined;
+
+ if (focusDoc) this.props.docView.ComponentView?.scrollFocus?.(focusDoc, true);
LinkManager.FollowLink(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false);
}
});