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

Vanessadc2691d6a9e5
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 3abc55c079..6b4daef7c4 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -332,7 +332,6 @@ export class Wnd {
return;
}
-
if (targetWndElement.contains(document.querySelector(`[data-id="${tabId}"]`))) {
return;
}
diff --git a/app/src/protyle/util/hasClosest.ts b/app/src/protyle/util/hasClosest.ts
index a650eebb96..a8b1aa760a 100644
--- a/app/src/protyle/util/hasClosest.ts
+++ b/app/src/protyle/util/hasClosest.ts
@@ -120,7 +120,7 @@ export const hasClosestByClassName = (element: Node, className: string, top = fa
let e = element as HTMLElement;
let isClosest = false;
while (e && !isClosest && (top ? e.tagName !== "BODY" : !e.classList.contains("protyle-wysiwyg"))) {
- if (e.classList.contains(className)) {
+ if (e.classList?.contains(className)) {
isClosest = true;
} else {
e = e.parentElement;
diff --git a/app/src/window/setHeader.ts b/app/src/window/setHeader.ts
index c954b7e88b..fea887d424 100644
--- a/app/src/window/setHeader.ts
+++ b/app/src/window/setHeader.ts
@@ -23,7 +23,7 @@ export const setTabPosition = () => {
const headerElement = item.headersElement.parentElement;
const rect = headerElement.getBoundingClientRect()
const dragElement = headerElement.querySelector('.item--readonly .fn__flex-1') as HTMLElement
- if (rect.top === 0) {
+ if (rect.top <= 0) {
dragElement.style.height = dragElement.parentElement.clientHeight + "px"
// @ts-ignore
dragElement.style.WebkitAppRegion = "drag";