Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
vassbence committed Nov 18, 2024
1 parent ec13b80 commit d89dc10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/RichTextEditor/FloatingLinkPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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)
Expand Down

0 comments on commit d89dc10

Please sign in to comment.