From 3ce6e4824b02aea306fd017f0f9fca624d645295 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 4 Mar 2024 15:22:23 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/10500 --- app/src/layout/dock/util.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/layout/dock/util.ts b/app/src/layout/dock/util.ts index 6b70d5729..69847f702 100644 --- a/app/src/layout/dock/util.ts +++ b/app/src/layout/dock/util.ts @@ -2,7 +2,7 @@ import {getAllModels} from "../getAll"; import {Tab} from "../Tab"; import {Graph} from "./Graph"; import {Outline} from "./Outline"; -import {getInstanceById, getWndByLayout, switchWnd} from "../util"; +import {getInstanceById, getWndByLayout, saveLayout, switchWnd} from "../util"; import {resizeTabs} from "../tabUtil"; import {Backlink} from "./Backlink"; import {App} from "../../index"; @@ -158,10 +158,12 @@ export const openOutline = async (protyle: IProtyle) => { isPreview: !protyle.preview.element.classList.contains("fn__none") })); } - })); - newWnd.element.classList.remove("fn__flex-1"); - newWnd.element.style.width = "200px"; + }), false, false); switchWnd(newWnd, wnd); + // https://github.com/siyuan-note/siyuan/issues/10500 + wnd.element.classList.remove("fn__flex-1"); + wnd.element.style.width = wnd.element.parentElement.clientWidth - 200 + "px"; + saveLayout(); }; export const resetFloatDockSize = () => {