facebook / facebook/lexical

Bug: Text selection on safari has extra empty selection area

Open
#7,106 2 comments 0 reactions 0 assignees View on GitHub
safari-bug selection
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 16h
Merged PRs (30d)
61

Description

Selection a text node in safari you can also select the area between 2 text nodes. While selecting, you first select the text then you can also select the empty area above/below the node and then you select the next node. This is lexical playground:

Image

The selection works correctly on Chrome:
Image

This is a lexical issue because it doesn't exist in other text editors, for example in the GitHub text editor itself.

Contributor guide

Open the contributing guide

Research direction

Reproduce the selection behavior in the Lexical playground using Safari, then compare it with Chrome and the GitHub text editor as described. Trace the editor's selection handling to identify where the empty area between text nodes becomes selectable; done means Safari selection matches the expected behavior without regressing normal text selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.