Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: fix https://github.com/siyuan-note/siyuan/issues/5045

Vanessaa3aa3d537b78
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 4d7ba87eb6..fb71f3bf95 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -886,7 +886,7 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
type: "separator"
});
}
- if (!hasNone || (hasNone && !hasRowSpan && hasColSpan)) {
+ if ((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan)) {
menus.push({
icon: "iconDeleteRow",
label: window.siyuan.languages["delete-row"],
diff --git a/app/src/protyle/util/table.ts b/app/src/protyle/util/table.ts
index 81974f6c07..5b92eec957 100644
--- a/app/src/protyle/util/table.ts
+++ b/app/src/protyle/util/table.ts
@@ -576,7 +576,7 @@ export const fixTable = (protyle: IProtyle, event: KeyboardEvent, range: Range)
// 删除当前行
if (matchHotKey(window.siyuan.config.keymap.editor.table["delete-row"].custom, event)) {
- if (!hasNone || (hasNone && !hasRowSpan && hasColSpan)) {
+ if ((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan)) {
deleteRow(protyle, range, cellElement, nodeElement);
}
event.preventDefault();