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

Vanessa6d35cbebae19
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 2a8d80067e..4a373a8338 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -308,8 +308,15 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme
}
/// #if MOBILE
const contentElement = hasClosestByClassName(blockElement, "protyle-content", true);
- if (contentElement) {
- contentElement.scrollTop = contentElement.scrollTop + cellRect.top - 110;
+ if (contentElement && cellElement.getAttribute("data-dtype") !== "checkbox") {
+ const keyboardToolbarElement = document.getElementById("keyboardToolbar")
+ const keyboardH = parseInt(keyboardToolbarElement.getAttribute("data-keyboardheight")) || (window.outerHeight / 2 - 42)
+ console.log(keyboardH, window.innerHeight, cellRect.bottom)
+ if (cellRect.bottom > window.innerHeight - keyboardH - 42) {
+ contentElement.scrollTop += cellRect.bottom - window.innerHeight + 42 + keyboardH;
+ } else if (cellRect.top < 110) {
+ contentElement.scrollTop -= 110 - cellRect.top;
+ }
}
/// #else
if (!blockElement.querySelector(".av__header")) {