From 637e11cdbaa213063c105bff7ad48bd5a3f59e97 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 3 Feb 2026 20:40:59 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16548 --- app/src/mobile/util/touch.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts index 3299e6343..a41375277 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(); }