Skip to content

[lexical] Bug Fix: Correct exit direction from decorator nodes in RTL - #7772

Merged
etrepum merged 6 commits into
meta:mainfrom
noamzaks:fix-rtl-selection
Aug 29, 2025
Merged

etrepum merged 6 commits into
meta:mainfrom
noamzaks:fix-rtl-selection

Conversation

@noamzaks

@noamzaks noamzaks commented Aug 23, 2025 •

Copy link
Copy Markdown
Contributor

Description

This updates the right/left key arrow handlers to correct whether the previous/next node should be selected, for RTL scenarios.

Closes #7771.
Closes #7775.

Test plan

Added a test for this.

Before

Screen.Recording.2025-08-23.at.19.37.13.mov

After

Screen.Recording.2025-08-23.at.20.05.40.mov

@vercel

vercel Bot commented Aug 23, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Aug 29, 2025 8:33am
lexical-playground Ready Ready Preview Comment Aug 29, 2025 8:33am

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 23, 2025
@noamzaks

Copy link
Copy Markdown
Contributor Author

Switching to draft because tests are not working yet

@etrepum etrepum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are some test failures with Firefox

@noamzaks

noamzaks commented Aug 29, 2025 •

Copy link
Copy Markdown
Contributor Author

I set the test to skip on Firefox, but there's another bug (that's unmodified by the changes) in Firefox where selection can't be after the DateTime component if it's at the end of an RTL paragraph.

Opened an issue for this in #7783.

@etrepum etrepum changed the title Bug Fix: Correct exit direction from decorator nodes in RTL [lexical] Bug Fix: Correct exit direction from decorator nodes in RTL Aug 29, 2025
@etrepum
etrepum added this pull request to the merge queue Aug 29, 2025
Merged via the queue into meta:main with commit 0cf4eb7 Aug 29, 2025
@etrepum etrepum mentioned this pull request Sep 5, 2025

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 6c16b5b1 Deployed Aug 29, 2025 by vercel[bot]
Preview – lexical — 6c16b5b1 Deployed Aug 29, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Selection movement incorrect for RTL going back from last node in paragraph Bug: Selection movement incorrect for RTL exiting decorator node

2 participants