Skip to content

Bug: Incorrect range when adding comment over link #5606

Open

Description

@matisszemturis

Can be tested in Playground.
Wrapping selection in MarkNodes does not work correctly, if Link node is partially selected.

Lexical version: 0.13.1

Steps To Reproduce

  1. In Playground, create a comment before Link
    image
  2. Comment part of Link node
    image

Link to code example:
Can be reproduced in playground

The current behavior

The whole link node gets wrapped in a comment:
image

The expected behavior

Only selected part gets wrapped in comment.

Activity

  1. Vedthakar commented on Oct 21, 2026

    @Vedthakar
    Contributor

    I opened #9427 to fix this: commenting on part of a link now marks only the selected part, inside the link, instead of wrapping the whole link.

    — Ved Thakar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions