diff options
author | A.J. Shulman <Shulman.aj@gmail.com> | 2025-05-11 10:46:15 -0400 |
---|---|---|
committer | A.J. Shulman <Shulman.aj@gmail.com> | 2025-05-11 10:46:15 -0400 |
commit | b87b2105e966928518c96c7702b68c12344ffdd7 (patch) | |
tree | 84fd5ecede3af9d773c10d02908cdde27da1a759 /src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx | |
parent | 0db4583914e43e6efdba3e86a614a19956e73b5e (diff) | |
parent | 0c3f86d57225a2991920adef3a337bc13e408ac0 (diff) |
Merge branch 'master' into agent-web-working
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx b/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx index 6c0eac103..1d790f5bb 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx @@ -134,20 +134,16 @@ export class FormattedTextBoxComment { // this checks if the selection is a hyperlink. If so, it displays the target doc's text for internal links, and the url of the target for external links. if (state.selection.$from && hrefs?.length) { - const nbef = findStartOfMark(state.selection.$from, view, findLinkMark); - const naft = findEndOfMark(state.selection.$from, view, findLinkMark) || nbef; - // nbef && - naft && - LinkInfo.SetLinkInfo({ - DocumentView: textBox.DocumentView, - styleProvider: textBox._props.styleProvider, - linkSrc: textBox.Document, - linkDoc: linkDoc ? (DocServer.GetCachedRefField(linkDoc) as Doc) : undefined, - location: (pos => [pos.left, pos.top + 25])(view.coordsAtPos(state.selection.from - Math.max(0, nbef - 1))), - hrefs, - showHeader: true, - noPreview, - }); + LinkInfo.SetLinkInfo({ + DocumentView: textBox.DocumentView, + styleProvider: textBox._props.styleProvider, + linkSrc: textBox.Document, + linkDoc: linkDoc ? (DocServer.GetCachedRefField(linkDoc) as Doc) : undefined, + location: (pos => [pos.left, pos.top + 25])(view.coordsAtPos(state.selection.from - Math.max(0, 0 - 1))), + hrefs, + showHeader: true, + noPreview, + }); } } |