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/8669

Vanessa64360e4d8833
diff --git a/app/src/protyle/preview/index.ts b/app/src/protyle/preview/index.ts
index ebda6617a2..64da783e72 100644
--- a/app/src/protyle/preview/index.ts
+++ b/app/src/protyle/preview/index.ts
@@ -10,7 +10,7 @@ import {getSearch, isMobile} from "../../util/functions";
import {shell} from "electron";
/// #endif
/// #if !MOBILE
-import {openAsset, openBy} from "../../editor/util";
+import {openAsset, openBy, updateOutline} from "../../editor/util";
import {getAllModels} from "../../layout/getAll";
import {setPanelFocus} from "../../layout/util";
/// #endif
@@ -74,6 +74,7 @@ export class Preview {
this.element.addEventListener("click", (event) => {
if (protyle.model) {
setPanelFocus(protyle.model.element.parentElement.parentElement);
+ updateOutline(getAllModels(), protyle.model.editor.protyle);
}
let target = event.target as HTMLElement;
while (target && !target.isEqualNode(this.element)) {