aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-29 18:09:26 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-29 18:09:26 -0500
commite11191876344b191c28a8cd6606df84e94f32104 (patch)
tree1a0644ddfbaefaf66f5531df88ef6384f8d85ef2
parent6b619a8ce7a1bdf363c792d6f27439be99f6277e (diff)
preview fix
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index e8db5aff8..d5d31d1ba 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -129,6 +129,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
@action
onContextMenu = (e: React.MouseEvent) => {
DocumentLinksButton.EditLink = undefined;
+ LinkDocPreview.LinkInfo = undefined;
e.preventDefault();
ContextMenu.Instance.addItem({ description: "Follow Default Link", event: () => this.followDefault(), icon: "arrow-right" });
ContextMenu.Instance.displayMenu(e.clientX, e.clientY);
@@ -137,6 +138,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
@action.bound
async followDefault() {
DocumentLinksButton.EditLink = undefined;
+ LinkDocPreview.LinkInfo = undefined;
DocumentManager.Instance.FollowLink(this.props.linkDoc, this.props.sourceDoc, doc => this.props.addDocTab(doc, "onRight"), false);
}
@@ -144,6 +146,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
deleteLink = (): void => {
LinkManager.Instance.deleteLink(this.props.linkDoc);
//this.props.showLinks();
+ LinkDocPreview.LinkInfo = undefined;
DocumentLinksButton.EditLink = undefined;
}