We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7717ee7 commit d83bde3Copy full SHA for d83bde3
packages/lexical-table/src/LexicalTableUtils.ts
@@ -510,8 +510,9 @@ export function $deleteTableRow__EXPERIMENTAL(): void {
510
$isRangeSelection(selection) || $isTableSelection(selection),
511
'Expected a RangeSelection or TableSelection',
512
);
513
- const anchor = selection.anchor.getNode();
514
- const focus = selection.focus.getNode();
+ const [anchor, focus] = selection.isBackward()
+ ? [selection.focus.getNode(), selection.anchor.getNode()]
515
+ : [selection.anchor.getNode(), selection.focus.getNode()];
516
const [anchorCell, , grid] = $getNodeTriplet(anchor);
517
const [focusCell] = $getNodeTriplet(focus);
518
const [gridMap, anchorCellMap, focusCellMap] = $computeTableMap(
0 commit comments