mirror of
https://github.com/facebook/lexical.git
synced 2025-05-21 00:57:23 +08:00
Fix issue where cmd/ctrl + left arrow after a tab character would cause exception (#6588)
This commit is contained in:
@ -773,7 +773,9 @@ function $handleMoveTo(
|
||||
const focusNode = focus.getNode();
|
||||
const isMoveToStart = type === MOVE_TO_START;
|
||||
|
||||
// Ensure the selection is within the codeblock
|
||||
if (
|
||||
!$isSelectionInCode(selection) ||
|
||||
!($isCodeHighlightNode(anchorNode) || $isTabNode(anchorNode)) ||
|
||||
!($isCodeHighlightNode(focusNode) || $isTabNode(focusNode))
|
||||
) {
|
||||
|
Reference in New Issue
Block a user