diff options
author | bobzel <zzzman@gmail.com> | 2021-02-02 13:53:50 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-02 13:53:50 -0500 |
commit | 2e26c14fe82fa7dfdeb51398558101a0047743e6 (patch) | |
tree | e5916f24085ffa228bd8a2f8827d9a89976caaac /src/client/views/linking/LinkMenuItem.tsx | |
parent | 41bb365dd4f787aec2262dcb07508e0de3837e10 (diff) |
playing with a general lightbox for Dash documents.
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
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<LinkMenuItemProps> { } } - 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) { |