mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-16 00:50:56 +08:00
This commit is contained in:
parent
d99e8cad9b
commit
ec1fc6fc7e
@ -146,16 +146,18 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showKeyboardToolbarUtil = (oldScrollTop: number) => {
|
const showKeyboardToolbarUtil = (oldScrollTop: number) => {
|
||||||
const toolbarElement = document.getElementById("keyboardToolbar");
|
|
||||||
const keyboardHeight = (parseInt(toolbarElement.getAttribute("data-keyboardheight")) + 42) + "px";
|
|
||||||
toolbarElement.style.height = keyboardHeight;
|
|
||||||
window.siyuan.mobile.editor.protyle.element.style.marginBottom = keyboardHeight;
|
|
||||||
window.siyuan.mobile.editor.protyle.contentElement.scrollTop = oldScrollTop;
|
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
showUtil = true;
|
showUtil = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
const toolbarElement = document.getElementById("keyboardToolbar");
|
||||||
|
const keyboardHeight = (parseInt(toolbarElement.getAttribute("data-keyboardheight")) + 42) + "px";
|
||||||
|
toolbarElement.style.height = keyboardHeight;
|
||||||
|
window.siyuan.mobile.editor.protyle.element.style.marginBottom = keyboardHeight;
|
||||||
|
window.siyuan.mobile.editor.protyle.contentElement.scrollTop = oldScrollTop;
|
||||||
|
}, Constants.TIMEOUT_TRANSITION); // 防止抖动
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showUtil = false;
|
showUtil = false;
|
||||||
}, 1000);
|
}, 1000); // 防止光标改变后斜杆菜单消失
|
||||||
};
|
};
|
||||||
|
|
||||||
const hideKeyboardToolbarUtil = () => {
|
const hideKeyboardToolbarUtil = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user