diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 4d7ba87eb..fb71f3bf9 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 81974f6c0..5b92eec95 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();