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

Vanessa2b459bc2699a
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index f63bba0008..e047e47678 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -320,7 +320,6 @@ const renderKeyboardToolbar = () => {
if (getSelection().rangeCount === 0 ||
window.siyuan.config.readonly ||
document.getElementById("toolbarName").getAttribute("readonly") === "readonly" ||
- window.screen.height - window.innerHeight < 160 || // reloadSync 会导致 selectionchange,从而导致键盘没有弹起的情况下出现工具栏
!document.activeElement || (
document.activeElement &&
!["INPUT", "TEXTAREA"].includes(document.activeElement.tagName) &&
diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts
index a53f77eaca..877d160e31 100644
--- a/app/src/protyle/util/reload.ts
+++ b/app/src/protyle/util/reload.ts
@@ -5,9 +5,15 @@ import {renderBacklink} from "../wysiwyg/renderBacklink";
import {hasClosestByClassName} from "./hasClosest";
import {preventScroll} from "../scroll/preventScroll";
import {isSupportCSSHL, searchMarkRender} from "../render/searchMarkRender";
+/// #if MOBILE
+import {hideKeyboardToolbar} from "../../mobile/util/keyboardToolbar";
+/// #endif
import {restoreLuteMarkdownSyntax} from "./paste";
export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?: boolean) => {
+ /// #if MOBILE
+ hideKeyboardToolbar();
+ /// #endif
if (!protyle.preview.element.classList.contains("fn__none")) {
protyle.preview.render(protyle);
removeLoading(protyle);