From 808c2b847202e4dd38739fba63b1fb8b7d2c89b8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 21 Apr 2024 22:43:29 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11085 --- app/src/protyle/util/table.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/util/table.ts b/app/src/protyle/util/table.ts index 592f3c4d7..2ab889fb0 100644 --- a/app/src/protyle/util/table.ts +++ b/app/src/protyle/util/table.ts @@ -5,6 +5,7 @@ import {matchHotKey} from "./hotKey"; import {isNotCtrl} from "./compatibility"; import {scrollCenter} from "../../util/highlightById"; import {insertEmptyBlock} from "../../block/util"; +import {removeBlock} from "../wysiwyg/remove"; const scrollToView = (nodeElement: Element, rowElement: HTMLElement, protyle: IProtyle) => { if (nodeElement.getAttribute("custom-pinthead") === "true") { @@ -230,6 +231,10 @@ export const deleteColumn = (protyle: IProtyle, range: Range, nodeElement: Eleme if (sideCellElement.offsetLeft + sideCellElement.clientWidth > nodeElement.firstElementChild.scrollLeft + nodeElement.firstElementChild.clientWidth) { nodeElement.firstElementChild.scrollLeft = sideCellElement.offsetLeft + sideCellElement.clientWidth - nodeElement.firstElementChild.clientWidth; } + } else { + nodeElement.classList.add("protyle-wysiwyg--select"); + removeBlock(protyle, nodeElement, range, "remove"); + return; } const tableElement = nodeElement.querySelector("table"); for (let i = 0; i < tableElement.rows.length; i++) {