Skip to content

Commit

Permalink
[lexical-table] Bug Fix: Fix down arrow key handling in TableObserver (
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum authored Nov 15, 2024
1 parent 14a4154 commit 12fe9aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/lexical-table/src/LexicalTableSelectionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,14 @@ export function applyTableHandlers(
const firstCell = firstRow.getFirstChild();
if (
$isTableCellNode(firstCell) &&
!$findMatchingParent(anchorCell, (node) => node.is(firstCell))
tableNode.is(
$findMatchingParent(
anchorCell,
(node) => node.is(tableNode) || node.is(firstCell),
),
)
) {
// The selection moved to the table, but not in the first cell
firstCell.selectStart();
return true;
}
Expand Down

0 comments on commit 12fe9aa

Please sign in to comment.