Skip to content

Commit

Permalink
Merge branch 'main' into forEachSelectedTextNode
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanJablo authored Dec 20, 2024
2 parents 813d61c + 23715f5 commit 60a66dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/lexical-table/src/LexicalTableObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
$createTextNode,
$getEditor,
$getNodeByKey,
$getRoot,
$getSelection,
$isElementNode,
$isParagraphNode,
Expand Down Expand Up @@ -470,8 +469,6 @@ export class TableObserver {
tableNode.selectPrevious();
// Delete entire table
tableNode.remove();
const rootNode = $getRoot();
rootNode.selectStart();
return;
}

Expand Down
4 changes: 4 additions & 0 deletions packages/lexical-table/src/LexicalTableSelectionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ export function applyTableHandlers(
return false;
}

if (!$isSelectionInTable(selection, tableNode)) {
return false;
}

if ($isTableSelection(selection)) {
if (event) {
event.preventDefault();
Expand Down

0 comments on commit 60a66dc

Please sign in to comment.