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

Vanessa637e11cdbaa2
diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts
index 3299e6343a..a413752774 100644
--- a/app/src/mobile/util/touch.ts
+++ b/app/src/mobile/util/touch.ts
@@ -33,21 +33,14 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
if ((["INPUT", "TEXTAREA"].includes(target.tagName) && target.getAttribute("readonly") !== "true") ||
(wysisygElement && wysisygElement.getAttribute("data-readonly") === "false")) {
if (target.tagName === "INPUT" || target.tagName === "TEXTAREA") {
- target.setAttribute("readonly", "false");
- setTimeout(() => {
- target.removeAttribute("readonly");
- window.JSAndroid?.showKeyboard();
- }, 0);
+ target.setAttribute("virtualkeyboardpolicy", "manual");
} else {
const editElement = hasClosestByAttribute(target, "contenteditable", "true");
if (editElement) {
- editElement.setAttribute("contenteditable", "false");
- setTimeout(() => {
- editElement.setAttribute("contenteditable", "true");
- window.JSAndroid?.showKeyboard();
- }, 0);
+ editElement.setAttribute("virtualkeyboardpolicy", "manual");
}
}
+ window.JSAndroid?.showKeyboard();
} else {
window.JSAndroid?.hideKeyboard();
}