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/17478

Vanessa32a260e3ac33
diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts
index 3887742ccd..3f4844c221 100644
--- a/app/src/mobile/index.ts
+++ b/app/src/mobile/index.ts
@@ -2,7 +2,12 @@ import {addScript, addScriptSync} from "../protyle/util/addScript";
import {Constants} from "../constants";
import {onMessage} from "./util/onMessage";
import {genUUID} from "../util/genID";
-import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByClassName} from "../protyle/util/hasClosest";
+import {
+ hasClosestBlock,
+ hasClosestByAttribute,
+ hasClosestByClassName,
+ hasTopClosestByClassName
+} from "../protyle/util/hasClosest";
import {Model} from "../layout/Model";
import "../assets/scss/mobile.scss";
import {Menus} from "../menus";
@@ -33,6 +38,7 @@ import {processIOSPurchaseResponse} from "../util/iOSPurchase";
import {updateControlAlt} from "../protyle/util/hotKey";
import {nbsp2space} from "../protyle/util/normalizeText";
import {callMobileAppShowKeyboard, canInput, setWebViewFocusable} from "./util/mobileAppUtil";
+import {hideAllElements} from "../protyle/ui/hideElements";
class App {
public plugins: import("../plugin").Plugin[] = [];
@@ -101,6 +107,9 @@ class App {
callMobileAppShowKeyboard();
}
}
+ if (!hasClosestByClassName(event.target as Element, "protyle-util")) {
+ hideAllElements(["util"]);
+ }
});
if (window.JSAndroid && window.JSAndroid.showKeyboard || window.JSHarmony && window.JSHarmony.showKeyboard) {
const __siyuan_original_focus = HTMLElement.prototype.focus;