From 2e26c14fe82fa7dfdeb51398558101a0047743e6 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 2 Feb 2021 13:53:50 -0500 Subject: playing with a general lightbox for Dash documents. --- src/client/views/linking/LinkMenuItem.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/views/linking') diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index 19ef03a31..e9a0486d1 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -106,13 +106,15 @@ export class LinkMenuItem extends React.Component { } } - onLinkButtonUp = (e: PointerEvent): void => { + onLinkButtonUp = action((e: PointerEvent): void => { document.removeEventListener("pointermove", this.onLinkButtonMoved); document.removeEventListener("pointerup", this.onLinkButtonUp); LinkManager.FollowLink(this.props.linkDoc, this.props.sourceDoc, this.props.docView.props, false); + LinkDocPreview.LinkInfo = undefined; + DocumentLinksButton.EditLink = undefined; e.stopPropagation(); - } + }); onLinkButtonMoved = async (e: PointerEvent) => { if (this._drag.current !== null && Math.abs((e.clientX - this._downX) * (e.clientX - this._downX) + (e.clientY - this._downY) * (e.clientY - this._downY)) > 5) { -- cgit v1.2.3-70-g09d2