mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-07 16:04:19 +01:00
This commit is contained in:
parent
a521e2c397
commit
1b7992e34b
2 changed files with 14 additions and 4 deletions
|
|
@ -5,6 +5,7 @@ import {activeBlur} from "./keyboardToolbar";
|
|||
import {isIPhone} from "../../protyle/util/compatibility";
|
||||
import {App} from "../../index";
|
||||
import {globalTouchEnd, globalTouchStart} from "../../boot/globalEvent/touch";
|
||||
import {Constants} from "../../constants";
|
||||
|
||||
let clientX: number;
|
||||
let clientY: number;
|
||||
|
|
@ -42,7 +43,7 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
|
|||
setTimeout(() => {
|
||||
editElement.focus();
|
||||
window.JSAndroid?.showKeyboard();
|
||||
}, 100);
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
} else {
|
||||
editElement.focus();
|
||||
window.JSAndroid?.showKeyboard();
|
||||
|
|
|
|||
|
|
@ -327,11 +327,20 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
if (viewsElement) {
|
||||
viewsElement.classList.add("av__views--show");
|
||||
}
|
||||
setTimeout(() => {
|
||||
/// #if MOBILE
|
||||
if (searchElement.getAttribute("virtualkeyboardpolicy") !== "manual") {
|
||||
searchElement.setAttribute("virtualkeyboardpolicy", "manual");
|
||||
setTimeout(() => {
|
||||
searchElement.focus();
|
||||
window.JSAndroid?.showKeyboard();
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
} else {
|
||||
searchElement.focus();
|
||||
// TODO
|
||||
window.JSAndroid?.showKeyboard();
|
||||
}, Constants.TIMEOUT_TRANSITION);
|
||||
}
|
||||
/// #else
|
||||
searchElement.focus();
|
||||
/// #endif
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue