Bug: Incorrect range when adding comment over link
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
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

2. Comment part of Link node

Link to code example:
Can be reproduced in playground
## The current behavior
The whole link node gets wrapped in a comment:

## The expected behavior
Only selected part gets wrapped in comment.
Contributor guide
Research direction
Reproduce the issue in the Playground by creating a comment before a Link node and selecting only part of that link. Start by tracing the MarkNodes wrapping behavior for the partially selected Link. Done means the comment wraps only the selected part rather than the whole link node.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100