Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/12615

Vanessa3fde9bb6905a
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index 5ec3ad4b91..624230e6bb 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -95,14 +95,14 @@ export const initBlockPopover = (app: App) => {
const boxData = response.data.boxInfo;
const tip = `${boxData.name} <small class='ft__on-surface'>${boxData.hSize}</small>${boxData.docCount !== 0 ? window.siyuan.languages.includeSubFile.replace("x", boxData.docCount) : ""}<br>${window.siyuan.languages.modifiedAt} ${boxData.hMtime}<br>${window.siyuan.languages.createdAt} ${boxData.hCtime}`
- const newNotebookItemElement = hasClosestByClassName(event.target, "b3-list-item__text");
- if (notebookItemElement && newNotebookItemElement && notebookItemElement.isSameNode(newNotebookItemElement)) {
+ const scopeNotebookItemElement = hasClosestByClassName(event.target, "b3-list-item__text");
+ if (notebookItemElement && scopeNotebookItemElement && notebookItemElement.isSameNode(scopeNotebookItemElement)) {
showTooltip(tip, notebookItemElement);
}
- if (newNotebookItemElement &&
- newNotebookItemElement.parentElement.getAttribute("data-type") === "navigation-root" &&
- newNotebookItemElement.parentElement.parentElement.getAttribute("data-url") === boxData.id) {
- newNotebookItemElement.setAttribute("aria-label", tip);
+ if (scopeNotebookItemElement &&
+ scopeNotebookItemElement.parentElement.getAttribute("data-type") === "navigation-root" &&
+ scopeNotebookItemElement.parentElement.parentElement.getAttribute("data-url") === boxData.id) {
+ scopeNotebookItemElement.setAttribute("aria-label", tip);
}
})
} else {