Skip to content

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

:bug: Position document tree context menus near the pointer https://github.com/siyuan-note/siyuan/issues/19269

Daniel3b5e3b4e6c84
diff --git a/app/src/menus/index.ts b/app/src/menus/index.ts
index dafd37fa9d..70da198325 100644
--- a/app/src/menus/index.ts
+++ b/app/src/menus/index.ts
@@ -91,7 +91,7 @@ export class Menus {
// navigation 根上:新建文档/文件夹/取消挂在/打开文件位置
const rect = target.getBoundingClientRect();
initNavigationMenu(app, target).popup({
- x: rect.left,
+ x: event.clientX,
y: rect.bottom,
h: rect.height,
});
@@ -103,7 +103,7 @@ export class Menus {
const rect = target.getBoundingClientRect();
// navigation 文件上:删除/重命名/打开文件位置/导出
initFileMenu(app, this.getDir(target), target.getAttribute("data-path"), target).popup({
- x: rect.left,
+ x: event.clientX,
y: rect.bottom,
h: rect.height,
});