Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Text direction bug when paragraph starts with a marknode #7021

Open
ebads67 opened this issue Jan 7, 2025 · 0 comments
Open

Bug: Text direction bug when paragraph starts with a marknode #7021

ebads67 opened this issue Jan 7, 2025 · 0 comments
Labels
marks @lexical/mark, comments, annotations text direction Related to bidirectional text input (rtl, ltr)

Comments

@ebads67
Copy link
Collaborator

ebads67 commented Jan 7, 2025

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.

ltr-rtl

@etrepum etrepum added text direction Related to bidirectional text input (rtl, ltr) marks @lexical/mark, comments, annotations labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
marks @lexical/mark, comments, annotations text direction Related to bidirectional text input (rtl, ltr)
Projects
None yet
Development

No branches or pull requests

2 participants