Browse Source

:art: https://github.com/siyuan-note/siyuan/issues/9724

Vanessa 1 year ago
parent
commit
6cb56b8767
2 changed files with 3 additions and 2 deletions
  1. 2 1
      app/src/protyle/render/av/action.ts
  2. 1 1
      app/src/protyle/render/av/cell.ts

+ 2 - 1
app/src/protyle/render/av/action.ts

@@ -5,7 +5,7 @@ import {openEditorTab} from "../../../menus/util";
 import {copySubMenu} from "../../../menus/commonMenuItem";
 import {getTypeByCellElement, popTextCell} from "./cell";
 import {getColIconByType, showColMenu} from "./col";
-import {insertAttrViewBlockAnimation, updateHeader} from "./row";
+import {insertAttrViewBlockAnimation, stickyRow, updateHeader} from "./row";
 import {emitOpenMenu} from "../../../plugin/EventBus";
 import {addCol} from "./col";
 import {openMenuPanel} from "./openMenuPanel";
@@ -316,6 +316,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
             rowElements.forEach(item => {
                 item.remove();
             });
+            stickyRow(blockElement, protyle.contentElement.getBoundingClientRect(), "all");
             updateHeader(blockElement.querySelector(".av__row"));
         }
     });

+ 1 - 1
app/src/protyle/render/av/cell.ts

@@ -112,7 +112,7 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
         // 属性面板
         return;
     }
-    const avHeaderRect = blockElement.querySelector(".av__header").getBoundingClientRect();
+    const avHeaderRect = blockElement.querySelector(".av__row--header").getBoundingClientRect();
     if (avHeaderRect.bottom > cellRect.top) {
         const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
         if (contentElement) {