@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.mjs
CHANGED
|
@@ -7917,7 +7917,18 @@ function EditorCore({
|
|
|
7917
7917
|
container.querySelectorAll(".editor-cell-active").forEach((el) => {
|
|
7918
7918
|
el.classList.remove("editor-cell-active");
|
|
7919
7919
|
});
|
|
7920
|
-
if (!inTableCellPos)
|
|
7920
|
+
if (!inTableCellPos) {
|
|
7921
|
+
setTableSelection(null);
|
|
7922
|
+
return;
|
|
7923
|
+
}
|
|
7924
|
+
if (tableSelection) {
|
|
7925
|
+
const { anchorCell, focusCell, tablePath } = tableSelection;
|
|
7926
|
+
const sameTable = JSON.stringify(tablePath) === JSON.stringify(inTableCellPos.tablePath);
|
|
7927
|
+
const singleCell = anchorCell[0] === focusCell[0] && anchorCell[1] === focusCell[1];
|
|
7928
|
+
if (!sameTable || singleCell) {
|
|
7929
|
+
setTableSelection(null);
|
|
7930
|
+
}
|
|
7931
|
+
}
|
|
7921
7932
|
const cellPath = [...inTableCellPos.tablePath, inTableCellPos.row, inTableCellPos.col];
|
|
7922
7933
|
const td = container.querySelector(
|
|
7923
7934
|
`[data-block-path="${JSON.stringify(cellPath)}"]`
|