Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-04 11:15:59 +08:00
parent d07ae095bb
commit 286bbee02e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 2 additions and 13 deletions

View file

@ -683,6 +683,7 @@ export const initKeyboardToolbar = () => {
hideKeyboardToolbarUtil();
focusByRange(range);
} else {
document.activeElement.blur();
buttonElement.classList.add("protyle-toolbar__item--current");
toolbarElement.querySelector('.keyboard__action[data-type="done"] use').setAttribute("xlink:href", "#iconCloseRound");
const oldScrollTop = protyle.contentElement.scrollTop;

View file

@ -5,7 +5,6 @@ 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;
@ -38,18 +37,7 @@ export const handleTouchEnd = (event: TouchEvent, app: App) => {
editElement = hasClosestByAttribute(target, "contenteditable", "true") as HTMLElement;
}
if (editElement) {
if (editElement.getAttribute("virtualkeyboardpolicy") !== "manual") {
editElement.setAttribute("virtualkeyboardpolicy", "manual");
setTimeout(() => {
editElement.focus();
window.JSAndroid?.showKeyboard();
}, Constants.TIMEOUT_TRANSITION);
} else {
editElement.focus();
window.JSAndroid?.showKeyboard();
}
} else {
window.JSAndroid?.hideKeyboard();
window.JSAndroid?.showKeyboard();
}
}