Bug: If the text in the selected area contains different colors, removing it and re-entering the text may cause style abnormalities.
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
If the text in the selected area contains different colors, removing it and re-entering the text may cause style abnormalities.
Lexical version: 0.12.2
## Steps To Reproduce
1. enter 123
2. change the fontColor to red
3. and then enter 456
4. select 3456 from right to left
5. and then enter 34, expect the 34 is the default color, however 3 is the default color and 4 is the red color
Contributor guide
Research direction
Reproduce the issue in Lexical 0.12.2 using the listed sequence: enter 123, color it red, append 456, select 3456 right to left, and replace it with 34. Trace the selection and text-color behavior involved in that edit. Done means both replacement characters use the default color rather than retaining red on the second character.
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