1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Lexical: Changed table esacpe handling

Avoids misuse of selectPrevious/Next as per prior commit which was then
causing problems elsewhere, and is probably best to avoid creation in
those select methods anyway.
This commit is contained in:
Dan Brown
2025-05-26 18:47:51 +01:00
parent a43a1832f5
commit 2e718c12e1
4 changed files with 19 additions and 19 deletions

View File

@@ -71,6 +71,7 @@ import {TableDOMTable, TableObserver} from './LexicalTableObserver';
import {$isTableRowNode} from './LexicalTableRowNode';
import {$isTableSelection} from './LexicalTableSelection';
import {$computeTableMap, $getNodeTriplet} from './LexicalTableUtils';
import {$selectOrCreateAdjacent} from "../../utils/nodes";
const LEXICAL_ELEMENT_KEY = '__lexicalTableSelection';
@@ -1113,7 +1114,7 @@ const selectTableNodeInDirection = (
false,
);
} else {
tableNode.selectPrevious();
$selectOrCreateAdjacent(tableNode, false);
}
return true;
@@ -1125,7 +1126,7 @@ const selectTableNodeInDirection = (
true,
);
} else {
tableNode.selectNext();
$selectOrCreateAdjacent(tableNode, true);
}
return true;