diff --git a/js/app/canvas_view.js b/js/app/canvas_view.js index ca77796..a780def 100644 --- a/js/app/canvas_view.js +++ b/js/app/canvas_view.js @@ -2009,6 +2009,13 @@ async function createCanvasWidget(node, widget, _app) { if (!isEditorOpen || requestId !== workflowOverviewToggleRequest) { return; } + if (expectedState) { + // Moving the LayerForge widget into fullscreen can cause + // ComfyUI to re-apply the previously selected node. Re-sync + // after the move as well, so an already-open properties panel + // switches from LayerForge details to the global Nodes view. + clearWorkflowOverviewSelection(); + } const panel = document.querySelector(workflowOverviewPanelSelector); const nodesTab = panel?.querySelector(workflowOverviewNodesTabSelector) ?? null; // Vue may need one extra frame to mount the global overview tabs after diff --git a/src/app/canvas_view.ts b/src/app/canvas_view.ts index 36b9192..949db18 100644 --- a/src/app/canvas_view.ts +++ b/src/app/canvas_view.ts @@ -2348,6 +2348,14 @@ $el("label.lf-clipboard-switch.lf-mask-switch", { return; } + if (expectedState) { + // Moving the LayerForge widget into fullscreen can cause + // ComfyUI to re-apply the previously selected node. Re-sync + // after the move as well, so an already-open properties panel + // switches from LayerForge details to the global Nodes view. + clearWorkflowOverviewSelection(); + } + const panel = document.querySelector(workflowOverviewPanelSelector); const nodesTab = panel?.querySelector( workflowOverviewNodesTabSelector