From c195094e912d8fb917b477b180c735dc366959f2 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:37:37 +1000 Subject: [PATCH] fix(ui): do not open panels when collapsed and window resize --- invokeai/frontend/web/src/features/ui/hooks/usePanel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts index efb0f3cdd1..f9ebe97064 100644 --- a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts +++ b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts @@ -124,7 +124,9 @@ export const usePanel = (arg: UsePanelOptions): UsePanelReturn => { * * For now, we'll just resize the panel to the min size every time the panel group is resized. */ - panelHandleRef.current.resize(minSizePct); + if (!panelHandleRef.current.isCollapsed()) { + panelHandleRef.current.resize(minSizePct); + } }); resizeObserver.observe(panelGroupElement);