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

Vanessa84b42d447a65
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index d667b7ff8e..da21bf9b4a 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -6,6 +6,7 @@ import {getIdFromSYProtocol, isLocalPath} from "../util/pathName";
import {App} from "../index";
import {Constants} from "../constants";
import {getCellText} from "../protyle/render/av/cell";
+import {isTouchDevice} from "../util/functions";
let popoverTargetElement: HTMLElement;
export const initBlockPopover = (app: App) => {
@@ -138,7 +139,7 @@ export const initBlockPopover = (app: App) => {
const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
// pad 端点击后 event.target 不会更新。
- const target = document.elementFromPoint(event.clientX, event.clientY);
+ const target = isTouchDevice() ? document.elementFromPoint(event.clientX, event.clientY) : event.target as HTMLElement
if (!target) {
return false;
}