Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/7885

Vanessaec1fc6fc7e7b
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index 4fb18941cc..ec52cba473 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -146,16 +146,18 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => {
};
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();
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(() => {
showUtil = false;
- }, 1000);
+ }, 1000); // 防止光标改变后斜杆菜单消失
};
const hideKeyboardToolbarUtil = () => {