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

Vanessab2c68ba47e79
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 8e12557cce..f9a98b23e6 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -25,6 +25,7 @@ import {scrollCenter} from "../util/highlightById";
import {getAllModels} from "./getAll";
import {countBlockWord} from "./status";
import {saveScroll} from "../protyle/scroll/saveScroll";
+import {Asset} from "../asset";
export class Wnd {
public id: string;
@@ -324,8 +325,13 @@ export class Wnd {
return;
}
- if (currentTab && target === currentTab.headElement && currentTab.model instanceof Graph) {
- currentTab.model.onGraph(false);
+ if (currentTab && target === currentTab.headElement) {
+ if (currentTab.model instanceof Graph) {
+ currentTab.model.onGraph(false);
+ } else if (currentTab.model instanceof Asset && currentTab.model.pdfObject) {
+ // https://ld246.com/article/1660283484105
+ currentTab.model.pdfObject.pdfViewer.container.focus();
+ }
}
if (currentTab && currentTab.model instanceof Editor) {