mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
This commit is contained in:
parent
efbc2bf814
commit
637e11cdba
1 changed files with 3 additions and 10 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue