Skip to content

Bug: Link editor is mispositioned when link is multiple lines tall #8263

@jimrandomh

Description

@jimrandomh

n Lexical, when the cursor is inside a link, FloatingLinkEditorPlugin shows a toolbar below the link with the destination URL and a edit buttons. However, if the link was wrapped between multiple lines, it would be "below" the first line of the link, but cover up the second; if the cursor was in the second-line continuation, the toolbar could therefore be covering the cursor.

Looking at the positioning code, it looks like the logic may have originally been written to place the toolbar above the link rather than below, then switched, but switched in a way that failed to account for the height of targetRect.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions