Bug: Whole Table LTR / RTL alignment is changed based on the current cell being typed
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
Lexical version:
v0.12.0
## Steps To Reproduce
1. Add a table in the playground - it is LTR by default
2. Write text in some cell
3. Switch the keyboard to some RTL language like Arabic or Hebrew.
4. Focus another cell and start typing letters - the whole table will toggle to RTL
5. Focus another cell, type "?" (still in RTL keyboard), the whole table will toggle to LTR because the bidi algo doesn't see RTL.
Keep typing in the same cell but now with RTL letters, the bidi algo will recognise it's RTL and the table will toggle it's layout again.
Link to code example:
## The current behavior
Table RTL / LTR alignment is automatically toggled based on the first typed letter of the current cell.
## The expected behavior
Allow global direction alignment for the whole table
Contributor guide
Research direction
Start by reproducing the behavior in the Lexical playground with an LTR table and an RTL keyboard, then trace how the table responds to the first typed character in a cell. The fix is done when typing RTL or non-RTL characters in different cells no longer changes the whole table's direction, while global table direction can still be controlled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, internationalization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100