From 7ec8db4f2ebdd0ce9e829becf9b3cca289eed7c5 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 4 Nov 2020 11:49:10 -0500 Subject: made linkMenuItems trigger on mouseUp to prevent dragging a link when clicking to follow one. --- src/client/views/linking/LinkMenuItem.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 1ba724889..5c9123876 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -109,6 +109,7 @@ export class LinkMenuItem extends React.Component { onLinkButtonUp = (e: PointerEvent): void => { document.removeEventListener("pointermove", this.onLinkButtonMoved); document.removeEventListener("pointerup", this.onLinkButtonUp); + DocumentView.followLinkClick(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false, false); e.stopPropagation(); } @@ -228,18 +229,17 @@ export class LinkMenuItem extends React.Component { onPointerDown={this.onLinkButtonDown}>
- {source ?

- Source: {source}

: null} + {source ?

Source: {source}

: null}
-
-

DocumentView.followLinkClick(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false, false)}> + +

+

{this.props.linkDoc.linksToAnnotation && Cast(this.props.destinationDoc.data, WebField)?.url.href === this.props.linkDoc.annotationUri ? "Annotation in" : ""} {title}

- {this.props.linkDoc.description !== "" ?

- {StrCast(this.props.linkDoc.description)}

: null} + {!this.props.linkDoc.description ? (null) :

{StrCast(this.props.linkDoc.description)}

} +
-- cgit v1.2.3-70-g09d2