Skip to content

Commit

Permalink
fixed issue 5181 where link address is not shown if comment is set in… (
Browse files Browse the repository at this point in the history
  • Loading branch information
btezzxxt authored Nov 1, 2023
1 parent 0ca8ef4 commit 53f55ae
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ function FloatingLinkEditor({
const selection = $getSelection();
if ($isRangeSelection(selection)) {
const node = getSelectedNode(selection);
const parent = node.getParent();
if ($isLinkNode(parent)) {
setLinkUrl(parent.getURL());
const linkParent = $findMatchingParent(node, $isLinkNode);

if (linkParent) {
setLinkUrl(linkParent.getURL());
} else if ($isLinkNode(node)) {
setLinkUrl(node.getURL());
} else {
Expand Down

2 comments on commit 53f55ae

@vercel
Copy link

@vercel vercel bot commented on 53f55ae Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical – ./packages/lexical-website

lexical-fbopensource.vercel.app
lexical-git-main-fbopensource.vercel.app
lexicaljs.com
www.lexical.dev
lexicaljs.org
lexical.dev

@vercel
Copy link

@vercel vercel bot commented on 53f55ae Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical-playground – ./packages/lexical-playground

lexical-playground-git-main-fbopensource.vercel.app
lexical-playground.vercel.app
playground.lexical.dev
lexical-playground-fbopensource.vercel.app

Please sign in to comment.