Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lytion
Copy link
Contributor

@lytion lytion commented Oct 13, 2025

Description

This PR allow caret to move outside of code-block when the caret is at the beginning or at the end of the block.
I believe this behavior was made by design. What I'm suggesting is a less strict behavior which allow moving the caret as long as there is a node above/below the code-block.

Test plan

In playground:

  1. type some text and press enter
  2. insert a code block and type some stuff
  3. Press enter enough time to exit code-block and type some text
  4. Now place the caret at the end of the code-block and press arrow down -> Caret doesn't move
  5. Try the same by placing it at the beginning of the code-block and press arrow up -> Caret doesn't move

Before

Caret doesn't move outside code-block when it's at the beginning or at the end of the block.

After

Caret can move outside

@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 Oct 13, 2025
@vercel
Copy link

vercel bot commented Oct 13, 2025

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

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Oct 13, 2025 9:00am
lexical-playground Ready Ready Preview Comment Oct 13, 2025 9:00am

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants