aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorJenny Yu <jennyyu212@outlook.com>2022-06-08 19:00:02 -0700
committerJenny Yu <jennyyu212@outlook.com>2022-06-08 19:00:02 -0700
commitdff15ea5cc4b351f9bea90c1822e1b02d4f0730b (patch)
treee3e893b6b8fdf95e9860673f0b4357e26dc9ff1d /src/client/views/linking/LinkMenuItem.tsx
parent88a8f35c33bbff61b0058a66d7bcc586d483deca (diff)
parent0ae3de67900489a6ffd43eabaa810c3ec3fdddd9 (diff)
fix: merge conflicts
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-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);
}
});