Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/16177

Vanessad175cda07db4
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 1e3cf779e5..df2520ebfc 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -1431,7 +1431,11 @@ ${countHTML}
const currentList = element.querySelector(`[data-node-id="${currentData.id}"]`) as HTMLElement;
if (currentList) {
currentList.classList.add("b3-list-item--focus");
- currentList.scrollIntoView();
+ if (!currentList.previousElementSibling && currentList.parentElement.previousElementSibling) {
+ currentList.parentElement.previousElementSibling.scrollIntoView();
+ } else {
+ currentList.scrollIntoView();
+ }
}
}
};