Skip to content

Commit

Permalink
Add check for DecoratorNodes for horizontal table navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
serey-roth committed May 17, 2024
1 parent 68f0592 commit 305e8b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/lexical-table/src/LexicalTableSelectionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
$getNearestNodeFromDOMNode,
$getPreviousSelection,
$getSelection,
$isDecoratorNode,
$isElementNode,
$isRangeSelection,
$isTextNode,
Expand Down Expand Up @@ -1359,6 +1360,11 @@ function $handleArrowKey(
return false;
}

const selectedNodes = selection.getNodes();
if (selectedNodes.length === 1 && $isDecoratorNode(selectedNodes[0])) {
return false;
}

if (
isExitingTableAnchor(anchorType, anchorOffset, anchorNode, direction)
) {
Expand Down

0 comments on commit 305e8b0

Please sign in to comment.