Skip to content

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

:bug: 分屏

Vanessa5c27e916bc5d
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 319c881ee7..33d4846f5e 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -262,6 +262,7 @@ export class Wnd {
// split to bottom
const newWnd = targetWnd.split("tb");
newWnd.headersElement.append(oldTab.headElement);
+ newWnd.headersElement.parentElement.classList.remove("fn__none");
newWnd.moveTab(oldTab);
if (dragElement.style.bottom === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
@@ -272,6 +273,7 @@ export class Wnd {
// split to right
const newWnd = targetWnd.split("lr");
newWnd.headersElement.append(oldTab.headElement);
+ newWnd.headersElement.parentElement.classList.remove("fn__none");
newWnd.moveTab(oldTab);
if (dragElement.style.right === "50%" && newWnd.element.previousElementSibling && targetWnd.element.parentElement) {
@@ -288,6 +290,7 @@ export class Wnd {
}
if (targetWnd) {
targetWnd.headersElement.append(oldTab.headElement);
+ targetWnd.headersElement.parentElement.classList.remove("fn__none");
targetWnd.moveTab(oldTab);
resizeTabs();
}
@@ -304,7 +307,7 @@ export class Wnd {
}
public switchTab(target: HTMLElement, pushBack = false, update = true) {
- setPanelFocus(this.headersElement.parentElement);
+ setPanelFocus(this.headersElement.parentElement.parentElement);
let currentTab: Tab;
this.children.forEach((item) => {
if (target === item.headElement) {
@@ -552,7 +555,7 @@ export class Wnd {
} else {
editors.forEach(item => {
if (!item.element.classList.contains("fn__none")) {
- setPanelFocus(item.parent.parent.headersElement.parentElement);
+ setPanelFocus(item.parent.parent.headersElement.parentElement.parentElement);
updatePanelByEditor(item.editor.protyle, true, true);
return;
}
diff --git a/app/src/menus/tab.ts b/app/src/menus/tab.ts
index 66f9e71a2b..b290709ad2 100644
--- a/app/src/menus/tab.ts
+++ b/app/src/menus/tab.ts
@@ -127,6 +127,7 @@ const splitSubMenu = (tab: Tab) => {
click: () => {
const newWnd = tab.parent.split("lr");
newWnd.headersElement.append(tab.headElement);
+ newWnd.headersElement.parentElement.classList.remove("fn__none");
newWnd.moveTab(tab);
}
});
@@ -146,6 +147,7 @@ const splitSubMenu = (tab: Tab) => {
click: () => {
const newWnd = tab.parent.split("tb");
newWnd.headersElement.append(tab.headElement);
+ newWnd.headersElement.parentElement.classList.remove("fn__none");
newWnd.moveTab(tab);
}
});