mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
d99e8cad9b
commit
ec1fc6fc7e
1 changed files with 8 additions and 6 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue