@trafica/editor 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7919,7 +7919,18 @@ function EditorCore({
|
|
|
7919
7919
|
container.querySelectorAll(".editor-cell-active").forEach((el) => {
|
|
7920
7920
|
el.classList.remove("editor-cell-active");
|
|
7921
7921
|
});
|
|
7922
|
-
if (!inTableCellPos)
|
|
7922
|
+
if (!inTableCellPos) {
|
|
7923
|
+
setTableSelection(null);
|
|
7924
|
+
return;
|
|
7925
|
+
}
|
|
7926
|
+
if (tableSelection) {
|
|
7927
|
+
const { anchorCell, focusCell, tablePath } = tableSelection;
|
|
7928
|
+
const sameTable = JSON.stringify(tablePath) === JSON.stringify(inTableCellPos.tablePath);
|
|
7929
|
+
const singleCell = anchorCell[0] === focusCell[0] && anchorCell[1] === focusCell[1];
|
|
7930
|
+
if (!sameTable || singleCell) {
|
|
7931
|
+
setTableSelection(null);
|
|
7932
|
+
}
|
|
7933
|
+
}
|
|
7923
7934
|
const cellPath = [...inTableCellPos.tablePath, inTableCellPos.row, inTableCellPos.col];
|
|
7924
7935
|
const td = container.querySelector(
|
|
7925
7936
|
`[data-block-path="${JSON.stringify(cellPath)}"]`
|