diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-07-12 13:42:03 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-07-12 13:42:03 -0400 |
commit | f159aa5378b433111d15d08ffe37d1e342958466 (patch) | |
tree | 794155d9863ff4c23012e36bb26ac6f77dd5c02a /src/client/views/linking/LinkMenu.tsx | |
parent | a3aaa1f756e80c68d87231898b08bd6557dc42bb (diff) |
fixed display of linkMenu
Diffstat (limited to 'src/client/views/linking/LinkMenu.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenu.tsx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/views/linking/LinkMenu.tsx b/src/client/views/linking/LinkMenu.tsx index 234cd5e07..2d151e9bc 100644 --- a/src/client/views/linking/LinkMenu.tsx +++ b/src/client/views/linking/LinkMenu.tsx @@ -44,8 +44,8 @@ export class LinkMenu extends React.Component<Props> { LinkDocPreview.LinkInfo = undefined; - if (this._linkMenuRef && !!!this._linkMenuRef.current?.contains(e.target as any)) { - if (this._editorRef && !!!this._editorRef.current?.contains(e.target as any)) { + if (this._linkMenuRef && !this._linkMenuRef.current?.contains(e.target as any)) { + if (this._editorRef && !this._editorRef.current?.contains(e.target as any)) { console.log("outside click"); DocumentLinksButton.EditLink = undefined; } @@ -90,14 +90,16 @@ export class LinkMenu extends React.Component<Props> { const sourceDoc = this.props.docView.props.Document; const groups: Map<string, Doc[]> = LinkManager.Instance.getRelatedGroupedLinks(sourceDoc); return <div className="linkMenu" ref={this._linkMenuRef} > - {!this._editingLink ? <div className="linkMenu-list" style={{ - left: this.props.location[0], top: this.props.location[1] }}> - {this.renderAllGroups(groups)} - </div> : <div className="linkMenu-listEditor" style={{ - left: this.props.location[0], top: this.props.location[1]}}> + {!this._editingLink ? <div className="linkMenu-list" style={{ + left: this.props.location[0], top: this.props.location[1] + }}> + {this.renderAllGroups(groups)} + </div> : <div className="linkMenu-listEditor" style={{ + left: this.props.location[0], top: this.props.location[1] + }}> <LinkEditor sourceDoc={this.props.docView.props.Document} linkDoc={this._editingLink} showLinks={action(() => this._editingLink = undefined)} /> - </div> + </div> } </div>; |