Skip to content

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

:bug: Preserve dock panel fullscreen in floating layouts https://github.com/siyuan-note/siyuan/issues/19438

Danieldb70a6299853
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index 2b7de25951..1c4a7a7637 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -490,12 +490,16 @@ export class Dock {
this.hideDock(true, preferredSize);
} else {
this.layout.element.style.transform = "";
+ this.layout.element.removeAttribute("data-temp");
this.layout.element.style.zIndex = "";
if (hasActive && this.panelVisible) {
this.resizeElement.classList.remove("fn__none");
}
}
this.layout.element.classList.toggle("layout--float", this.isFloating());
+ if (this.isFloating() && this.layout.element.querySelector(".fullscreen")) {
+ this.showDock(true);
+ }
if (!hasActive && !this.isFloating()) {
this.layout.element.style[this.position === "Bottom" ? "height" : "width"] = "0px";
}
@@ -601,6 +605,12 @@ export class Dock {
this.layout.element.style.left = this.elements[0].clientWidth + "px";
this.layout.element.style.right = this.elements[1].clientWidth + "px";
}
+ // 全屏面板以窗口定位,浮动位移保留到退出全屏时恢复。
+ const fullscreenElement = this.layout.element.querySelector(".fullscreen");
+ if (fullscreenElement && fullscreenElement.clientHeight > 0) {
+ this.layout.element.setAttribute("data-temp", this.layout.element.style.transform);
+ this.layout.element.style.transform = "none";
+ }
}
public hideDock(reset = false, preferredSize?: number) {