Skip to content

Commit

Permalink
Bug Fix: Add check for DecoratorNode for horizontal table navigatio…
Browse files Browse the repository at this point in the history
…n. (#6129)
  • Loading branch information
serey-roth authored May 19, 2024
1 parent 58853cc commit 94f8614
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 94f8614

Please sign in to comment.