Skip to content

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

:iphone:

Vanessa7e873032176b
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index dc71f96058..36c1e778c1 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -208,11 +208,6 @@ export const initKeyboardToolbar = () => {
} else if (type === "redo") {
protyle.undo.redo(protyle);
return;
- } else if (type === "goback") {
- const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
- dynamicElements[0].classList.remove("fn__none");
- dynamicElements[1].classList.add("fn__none");
- return;
} else if (type === "goinline") {
const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
dynamicElements[1].classList.remove("fn__none");
@@ -228,7 +223,13 @@ export const initKeyboardToolbar = () => {
return;
}
// inline element
- if (["a", "block-ref", "inline-math", "inline-memo", "text"].includes(type)) {
+ if (type === "goback") {
+ const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
+ dynamicElements[0].classList.remove("fn__none");
+ dynamicElements[1].classList.add("fn__none");
+ focusByRange(range);
+ return;
+ } else if (["a", "block-ref", "inline-math", "inline-memo", "text"].includes(type)) {
protyle.toolbar.element.querySelector(`[data-type="${type}"]`).dispatchEvent(new CustomEvent("click"));
return;
} else if (["strong", "em", "s", "code", "mark", "tag", "u", "sup", "clear", "sub", "kbd"].includes(type)) {