Skip to content

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

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

Vanessa8cd73f7c75f6
diff --git a/app/src/layout/Tab.ts b/app/src/layout/Tab.ts
index c9525b6ba2..57104810c4 100644
--- a/app/src/layout/Tab.ts
+++ b/app/src/layout/Tab.ts
@@ -44,9 +44,18 @@ export class Tab {
this.headElement.addEventListener("mouseenter", (event) => {
event.stopPropagation();
event.preventDefault();
+ let id = ""
if (this.model instanceof Editor && this.model.editor?.protyle?.block?.rootID) {
+ id = (this.model as Editor).editor.protyle.block.rootID
+ } else if (!this.model){
+ const initData = JSON.parse(this.headElement.getAttribute("data-initdata")||"{}")
+ if (initData) {
+ id = initData.blockId
+ }
+ }
+ if (id) {
fetchPost("/api/filetree/getFullHPathByID", {
- id: (this.model as Editor).editor.protyle.block.rootID
+ id
}, (response) => {
if (!this.headElement.getAttribute("aria-label")) {
showTooltip(escapeHtml(response.data), this.headElement);