diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index e91996725..b933507a2 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -539,16 +539,20 @@ export class DockviewComponent const theme = getTheme(this.gridview.element); - const popoutWindow = new DockviewPopoutGroupPanel(group, { - className: theme ?? '', - popoutUrl: options?.popoutUrl ?? '/popout.html', - box: { - left: window.screenX + box.left, - top: window.screenY + box.top, - width: box.width, - height: box.height, - }, - }); + const popoutWindow = new DockviewPopoutGroupPanel( + `${this.id}-${group.id}`, // globally unique within dockview + group, + { + className: theme ?? '', + popoutUrl: options?.popoutUrl ?? '/popout.html', + box: { + left: window.screenX + box.left, + top: window.screenY + box.top, + width: box.width, + height: box.height, + }, + } + ); popoutWindow.addDisposables( { diff --git a/packages/dockview-core/src/dockview/dockviewPopoutGroupPanel.ts b/packages/dockview-core/src/dockview/dockviewPopoutGroupPanel.ts index 3052cb6ff..803fa5411 100644 --- a/packages/dockview-core/src/dockview/dockviewPopoutGroupPanel.ts +++ b/packages/dockview-core/src/dockview/dockviewPopoutGroupPanel.ts @@ -7,6 +7,7 @@ export class DockviewPopoutGroupPanel extends CompositeDisposable { readonly window: PopoutWindow; constructor( + readonly id: string, readonly group: DockviewGroupPanel, private readonly options: { className: string; @@ -16,7 +17,7 @@ export class DockviewPopoutGroupPanel extends CompositeDisposable { ) { super(); - this.window = new PopoutWindow('test', options.className ?? '', { + this.window = new PopoutWindow(id, options.className ?? '', { url: this.options.popoutUrl, left: this.options.box.left, top: this.options.box.top,