Vanessa 2026-02-03 21:32:50 +08:00
parent a521e2c397
commit 1b7992e34b
2 changed files with 14 additions and 4 deletions

View file

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

View file

@ -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;