Skip to content

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

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

[lexical] Bug Fix: Correct exit direction from decorator nodes in RTL#7772
etrepum merged 6 commits intofacebook:mainfrom
noamzaks:fix-rtl-selection

Conversation

@noamzaks
Copy link
Copy Markdown
Contributor

@noamzaks noamzaks commented Aug 23, 2025

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
Copy link
Copy Markdown

vercel bot commented Aug 23, 2025

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

Copy link
Copy Markdown
Collaborator

@etrepum etrepum left a comment

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
Copy link
Copy Markdown
Contributor Author

noamzaks commented Aug 29, 2025

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 facebook:main with commit 0cf4eb7 Aug 29, 2025
66 of 67 checks passed
@etrepum etrepum mentioned this pull request Sep 5, 2025
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