An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/9089
Vanessa3724d274c9f2
diff --git a/app/src/boot/globalEvent/event.ts b/app/src/boot/globalEvent/event.tsindex 85a206f49e..e49ee4a31a 100644--- a/app/src/boot/globalEvent/event.ts+++ b/app/src/boot/globalEvent/event.ts@@ -5,6 +5,7 @@ import {windowKeyUp} from "./keyup";import {windowKeyDown} from "./keydown";import {globalClick} from "./click";import {goBack, goForward} from "../../util/backForward";+import {Constants} from "../../constants";export const initWindowEvent = (app: App) => {document.body.addEventListener("mouseleave", () => {@@ -14,9 +15,18 @@ export const initWindowEvent = (app: App) => {window.siyuan.layout.bottomDock.hideDock();}});+ let mouseIsEnter = false;+ document.body.addEventListener("mouseenter", () => {+ if (window.siyuan.layout.leftDock) {+ mouseIsEnter = true;+ setTimeout(() => {+ mouseIsEnter = false;+ }, Constants.TIMEOUT_TRANSITION);+ }+ });window.addEventListener("mousemove", (event: MouseEvent & { target: HTMLElement }) => {- windowMouseMove(event);+ windowMouseMove(event, mouseIsEnter);});window.addEventListener("mouseup", (event) => {@@ -46,6 +56,6 @@ export const initWindowEvent = (app: App) => {});window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {- globalClick(event);+ globalClick(event);});};diff --git a/app/src/boot/globalEvent/mousemove.ts b/app/src/boot/globalEvent/mousemove.tsindex e18dc63c83..0630129dc5 100644--- a/app/src/boot/globalEvent/mousemove.ts+++ b/app/src/boot/globalEvent/mousemove.ts@@ -14,7 +14,11 @@ const getRightBlock = (element: HTMLElement, x: number, y: number) => {return nodeElement;};-export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }) => {+export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }, mouseIsEnter:boolean) => {+ if (document.body.classList.contains("body--blur")) {+ // 非激活状态下不执行 https://ld246.com/article/1693474547631+ return;+ }// https://github.com/siyuan-note/siyuan/pull/8793const coordinates = window.siyuan.coordinates ?? (window.siyuan.coordinates = {pageX: 0,@@ -40,7 +44,8 @@ export const windowMouseMove = (event: MouseEvent & { target: HTMLElement }) =>item.editor.protyle.breadcrumb.render(item.editor.protyle, true);});}- if (event.buttons === 0 && // 鼠标按键被按下时不触发+ if (!mouseIsEnter &&+ event.buttons === 0 && // 鼠标按键被按下时不触发window.siyuan.layout.bottomDock &&!isWindow() && !hasClosestByClassName(event.target, "b3-dialog") && !hasClosestByClassName(event.target, "b3-menu")) {if (event.clientX < 43) {