From a3aa3d537b78806e8ffda0cc40160bfdd6d02800 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 30 May 2022 11:17:32 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5045 --- app/src/menus/protyle.ts | 2 +- app/src/protyle/util/table.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();