mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 18:00:15 +01:00
This commit is contained in:
parent
e014a75fdd
commit
5da5e73a09
2 changed files with 6 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
|
|||
const target = event.target as HTMLElement;
|
||||
const wysisygElement = hasClosestByClassName(target, "protyle-wysiwyg", true);
|
||||
if (!yDiff || Math.abs(yDiff) < 10) {
|
||||
let editElement;
|
||||
let editElement: HTMLElement;
|
||||
if (["INPUT", "TEXTAREA"].includes(target.tagName) && target.getAttribute("readonly") !== "true") {
|
||||
editElement = target;
|
||||
} else if (wysisygElement && wysisygElement.getAttribute("data-readonly") === "false") {
|
||||
|
|
@ -40,9 +40,11 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
|
|||
if (editElement.getAttribute("virtualkeyboardpolicy") !== "manual") {
|
||||
editElement.setAttribute("virtualkeyboardpolicy", "manual");
|
||||
setTimeout(() => {
|
||||
editElement.focus();
|
||||
window.JSAndroid?.showKeyboard();
|
||||
}, 100);
|
||||
} else {
|
||||
editElement.focus();
|
||||
window.JSAndroid?.showKeyboard();
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue