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

Vanessa34171769d75b
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index 65916d4432..2854d26ff7 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -117,6 +117,7 @@ ${this.position === "Top" ? ("top:" + (this.element.offsetHeight + document.getE
} else {
target.setAttribute("aria-label", window.siyuan.languages.unpin);
this.layout.element.style.opacity = "";
+ this.layout.element.style.transition = "var(--b3-width-transition)";
if (hasActive) {
this.resizeElement.classList.remove("fn__none");
}
diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts
index 610754ed93..0e134e44a3 100644
--- a/app/src/protyle/util/selection.ts
+++ b/app/src/protyle/util/selection.ts
@@ -198,10 +198,14 @@ export const getSelectionPosition = (nodeElement: Element, range?: Range) => {
if (!parentElement) {
parentElement = range.startContainer.childNodes[range.startOffset - 1] as HTMLElement;
}
- while (!parentElement.getClientRects || (parentElement.getClientRects && parentElement.getClientRects().length === 0)) {
- parentElement = parentElement.parentElement;
+ if (!parentElement) {
+ cursorRect = range.getBoundingClientRect();
+ } else {
+ while (!parentElement.getClientRects || (parentElement.getClientRects && parentElement.getClientRects().length === 0)) {
+ parentElement = parentElement.parentElement;
+ }
+ cursorRect = parentElement.getClientRects()[0];
}
- cursorRect = parentElement.getClientRects()[0];
}
}
} else {
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index 89fa6c8dda..0b6e117797 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -95,7 +95,7 @@ export const globalShortcut = () => {
});
window.siyuan.hideBreadcrumb = false;
}
- if (!isWindow() && !hasClosestByClassName(event.target, "b3-dialog")) {
+ if (!isWindow() && !hasClosestByClassName(event.target, "b3-dialog") && !hasClosestByClassName(event.target, "b3-menu")) {
if (event.clientX < 43) {
if (!window.siyuan.layout.leftDock.pin && window.siyuan.layout.leftDock.layout.element.clientWidth > 0) {
if (event.clientY > document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight &&