Bug: Clicking a Checkbox focuses the editor and/or line
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
The issue seems to be with this line here:
https://github.com/facebook/lexical/blob/main/packages/lexical-react/src/LexicalCheckListPlugin.tsx#L211
I think this should either be an optional behavior or, perhaps, removed as a default. Also, in our testing it seems like this will often times just focus the editor entirely, not just the line (which is what I would have assumed this code intended to do).
## The current behavior
Clicking on a checkbox focuses the editor and/or the line.
## The expected behavior
Clicking on a checkbox should toggle the checkbox state without stealing or otherwise modifying focus.
Contributor guide
Research direction
Start at packages/lexical-react/src/LexicalCheckListPlugin.tsx around line 211 and reproduce the checkbox interaction to observe how focus changes. The work is done when clicking a checkbox toggles its state without focusing or otherwise modifying the editor or line; check any nearby behavior or tests before deciding how it should be verified.
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
- Clearly specified
- Newbie friendliness
- 45/100