Bug: Text direction bug when paragraph starts with a marknode
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 55
Description
The text direction (ltr vs rtl) of a paragraph is usually determined by the first letter of the paragraph. However if the first part of the paragraph including the first letter is wrapped in a marknode for commenting, the text direction is set without considering the text inside the marknode.
Lexical version:
## Steps To Reproduce
1. Add an English word in an empty Lexical playground.
2. Add some letters from rtl language. The direction doesn't change.
3. Now wrap the English word in marknode by selecting it and adding a comment on it. The text direction is changed from ltr to rtl.
## The expected behavior
The text direction should not be changed when the starting text is wrapped in a marknode.

Contributor guide
Assessment
This issue has not been assessed yet.