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(); }