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: https://github.com/siyuan-note/siyuan/issues/13653
Vanessa736fdb2d7e51
diff --git a/app/src/boot/globalEvent/click.ts b/app/src/boot/globalEvent/click.tsindex 01b869415a..bcf9f050ad 100644--- a/app/src/boot/globalEvent/click.ts+++ b/app/src/boot/globalEvent/click.ts@@ -37,10 +37,7 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {window.siyuan.menus.menu.remove();}}- // protyle.toolbar 点击空白处时进行隐藏- if (!hasClosestByClassName(event.target, "protyle-toolbar")) {- hideAllElements(["toolbar"]);- }+if (!hasClosestByClassName(event.target, "pdf__outer")) {hideAllElements(["pdfutil"]);}diff --git a/app/src/boot/globalEvent/event.ts b/app/src/boot/globalEvent/event.tsindex 273a42facd..57e098d63b 100644--- a/app/src/boot/globalEvent/event.ts+++ b/app/src/boot/globalEvent/event.ts@@ -19,6 +19,7 @@ import {Tab} from "../../layout/Tab";import {hideTooltip} from "../../dialog/tooltip";import {openFileById} from "../../editor/util";import {checkFold} from "../../util/noRelyPCFunction";+import {hideAllElements} from "../../protyle/ui/hideElements";export const initWindowEvent = (app: App) => {document.body.addEventListener("mouseleave", () => {@@ -57,6 +58,13 @@ export const initWindowEvent = (app: App) => {}});+ window.addEventListener("mousedown", (event) => {+ // protyle.toolbar 点击空白处时进行隐藏+ if (!hasClosestByClassName(event.target as Element, "protyle-toolbar")) {+ hideAllElements(["toolbar"]);+ }+ });+window.addEventListener("keyup", (event) => {windowKeyUp(app, event);});diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex a496d3c685..fbb7d0c360 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -2656,7 +2656,6 @@ export class WYSIWYG {if (newRange.toString().replace(Constants.ZWSP, "") !== "") {protyle.toolbar.render(protyle, newRange);} else {- hideElements(["toolbar"], protyle);// https://github.com/siyuan-note/siyuan/issues/9785protyle.toolbar.range = newRange;}