From d7685db438f66e9e75e3aa8ebbce43a3d2bb49c6 Mon Sep 17 00:00:00 2001 From: mathuo <6710312+mathuo@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:35:37 +0100 Subject: [PATCH] chore: fix --- .../src/dockview/dockviewComponent.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index d83ed7923..3ff0f2cca 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -720,10 +720,13 @@ export class DockviewComponent return false; } - const referenceGroup = - itemToPopout instanceof DockviewPanel - ? itemToPopout.group - : itemToPopout; + const referenceGroup = options?.referenceGroup + ? options.referenceGroup + : itemToPopout instanceof DockviewPanel + ? itemToPopout.group + : itemToPopout; + + const referenceLocation = itemToPopout.api.location.type; /** * The group that is being added doesn't already exist within the DOM, the most likely occurrence @@ -740,6 +743,7 @@ export class DockviewComponent group = options.overridePopoutGroup; } else { group = this.createGroup({ id: groupId }); + if (popoutContainer) { this._onDidAddGroup.fire(group); } @@ -777,8 +781,6 @@ export class DockviewComponent this ); - const referenceLocation = itemToPopout.api.location.type; - group.model.renderContainer = overlayRenderContainer; group.layout( _window.window!.innerWidth,