diff --git a/src/components/RichTextEditor/FloatingLinkPlugin.tsx b/src/components/RichTextEditor/FloatingLinkPlugin.tsx index 89b442f..0f1d795 100644 --- a/src/components/RichTextEditor/FloatingLinkPlugin.tsx +++ b/src/components/RichTextEditor/FloatingLinkPlugin.tsx @@ -59,7 +59,6 @@ function FloatingLinkPlugin() { const root = editor.getRootElement() const anchor = selection.anchor.getNode() const anchorParent = anchor.getParent() - const focus = selection.focus.getNode() const native = window.getSelection() const node = @@ -69,7 +68,7 @@ function FloatingLinkPlugin() { ? anchorParent : null - if (node && anchor === focus && root.contains(native.anchorNode)) { + if (node && root.contains(native.anchorNode)) { refs.setReference(native.anchorNode.parentElement) setValue(node.__url) setPrevValue(node.__url)