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

Vanessa091d7033bdb2
diff --git a/app/src/asset/pdf/app.js b/app/src/asset/pdf/app.js
index 1e7f7c3327..4acb389719 100644
--- a/app/src/asset/pdf/app.js
+++ b/app/src/asset/pdf/app.js
@@ -3185,6 +3185,16 @@ function webViewerKeyDown(evt) {
(evt.shiftKey ? 4 : 0) |
(evt.metaKey ? 8 : 0);
+ if (cmd === 0 && [38, 40].includes(evt.keyCode)) {
+ // NOTE https://github.com/siyuan-note/siyuan/issues/8164
+ if (document.activeElement) {
+ document.activeElement.blur();
+ }
+ setTimeout(() => {
+ pdfViewer.focus();
+ })
+ return;
+ }
// NOTE
if (!evt.repeat && (cmd === 8 || cmd === 1 || cmd === 2) && evt.keyCode === 68 && // D