Pārlūkot izejas kodu

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

Vanessa 3 gadi atpakaļ
vecāks
revīzija
a3aa3d537b
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      app/src/menus/protyle.ts
  2. 1 1
      app/src/protyle/util/table.ts

+ 1 - 1
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"],

+ 1 - 1
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();