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

Vanessa13ebc39bca6d
diff --git a/app/src/protyle/scroll/event.ts b/app/src/protyle/scroll/event.ts
index 7c4ae34d8b..054670715d 100644
--- a/app/src/protyle/scroll/event.ts
+++ b/app/src/protyle/scroll/event.ts
@@ -45,8 +45,9 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
}
if (protyle.scroll.lastScrollTop - element.scrollTop > 0) {
// up
- if (element.scrollTop < element.clientHeight / 2 &&
+ if (element.scrollTop < element.clientHeight &&
protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") !== "true") {
+ protyle.contentElement.style.overflow = "hidden";
protyle.wysiwyg.element.setAttribute("data-top", element.scrollTop.toString());
fetchPost("/api/filetree/getDoc", {
id: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"),
@@ -54,6 +55,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
k: protyle.options.key || "",
size: Constants.SIZE_GET,
}, getResponse => {
+ protyle.contentElement.style.overflow = "";
onGet(getResponse, protyle, [Constants.CB_GET_BEFORE, Constants.CB_GET_UNCHANGEID]);
});
}