Skip to content

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

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

Vanessa04308fb2dd3a
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index cd1336c83d..6456bce6aa 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -297,12 +297,18 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
if (headerTransform) {
(e.querySelector(".av__row--header") as HTMLElement).style.transform = headerTransform;
} else {
- stickyRow(e, editRect, "top");
+ // 需等待渲染完,否则 getBoundingClientRect 错误 https://github.com/siyuan-note/siyuan/issues/13787
+ setTimeout(() => {
+ stickyRow(e, editRect, "top");
+ }, Constants.TIMEOUT_LOAD)
}
if (footerTransform) {
(e.querySelector(".av__row--footer") as HTMLElement).style.transform = footerTransform;
} else {
- stickyRow(e, editRect, "bottom");
+ // 需等待渲染完,否则 getBoundingClientRect 错误 https://github.com/siyuan-note/siyuan/issues/13787
+ setTimeout(() => {
+ stickyRow(e, editRect, "bottom");
+ }, Constants.TIMEOUT_LOAD);
}
if (selectCellId) {
const newCellElement = e.querySelector(`.av__row[data-id="${selectCellId.split(Constants.ZWSP)[0]}"] .av__cell[data-col-id="${selectCellId.split(Constants.ZWSP)[1]}"]`);
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index d0e84de7a9..bad400d14a 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -131,7 +131,7 @@ ${getTypeByCellElement(item) === "block" ? ' data-detached="true"' : ""}><span c
});
let html = "";
srcIDs.forEach((id) => {
- const blockCellElement = blockElement.querySelector(`[data-block-id="${id}"]`);
+ const blockCellElement = blockElement.querySelector(`[data-block-id="${id}"]`);
if (!blockCellElement) {
html += `<div class="av__row" data-type="ghost" data-id="${id}" data-avid="${avId}" data-previous-id="${previousId}">
${colHTML}