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

Vanessa5e15d7365576
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index 9a816b367b..8964a294ff 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -1,6 +1,6 @@
import {setEditMode} from "../util/setEditMode";
import {scrollEvent} from "../scroll/event";
-import {isMobile} from "../../util/functions";
+import {isMobile, isTouchDevice} from "../../util/functions";
import {Constants} from "../../constants";
import {isMac} from "../util/compatibility";
import {setInlineStyle} from "../../util/assets";
@@ -184,7 +184,9 @@ export const initUI = (protyle: IProtyle) => {
});
});
let overAttr = false;
- protyle.element.addEventListener("mouseover", (event: KeyboardEvent & { target: HTMLElement }) => {
+ protyle.element.addEventListener(isTouchDevice() ? "touchend" : "mouseover", (event: KeyboardEvent & {
+ target: HTMLElement
+ }) => {
// attr
const attrElement = hasClosestByClassName(event.target, "protyle-attr");
if (attrElement && !attrElement.parentElement.classList.contains("protyle-title")) {