Bug: Text direction bug when paragraph starts with a marknode #7021
Open
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
- Add an English word in an empty Lexical playground.
- Add some letters from rtl language. The direction doesn't change.
- 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.