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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user