aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkMenuItem.tsx
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-23 13:20:12 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-23 13:20:12 -0700
commit86a8751ca5a66fd42d7b2b3dee56210f2ef2b62d (patch)
tree694620d8360d60d883ac651869fb3b09ffe05a90 /src/client/views/linking/LinkMenuItem.tsx
parent90d5abaf3c32b53f34f6bd89e854c57c250937b0 (diff)
adjustments to link following/editing behavior
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 509de2745..30571a165 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -154,7 +154,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
DocumentLinksButton.EditLink = undefined;
LinkDocPreview.LinkInfo = undefined;
- this.props.linkDoc.linksToAnnotation && (Doc.GetProto(this.props.destinationDoc).data = new WebField(StrCast(this.props.linkDoc.annotationUrl))); // if destination is a Hypothes.is annotation, redirect website to the annotation's URL to scroll to the annotation
+ // this.props.linkDoc.linksToAnnotation && (Doc.GetProto(this.props.destinationDoc).data = new WebField(StrCast(this.props.linkDoc.annotationUrl))); // if destination is a Hypothes.is annotation, redirect website to the annotation's URL to scroll to the annotation
if (this.props.linkDoc.follow) {
if (this.props.linkDoc.follow === "Default") {
@@ -167,6 +167,8 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
} else {
DocumentManager.Instance.FollowLink(this.props.linkDoc, this.props.sourceDoc, doc => this.props.addDocTab(doc, "onRight"), false);
}
+
+ this.props.linkDoc.linksToAnnotation && setTimeout(() => window.open(StrCast(this.props.linkDoc.annotationUrl), '_blank'), 1000); // open external page if hypothes.is annotation
}
@action