Skip to content

Commit

Permalink
bug: wrong event ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
mathuo committed Dec 9, 2024
1 parent 25489bf commit 56bdec8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/dockview-core/src/dockview/dockviewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,20 +659,23 @@ export class DockviewComponent
const isGroupAddedToDom =
referenceGroup.element.parentElement !== null;

const group = !isGroupAddedToDom
? referenceGroup
: options?.overridePopoutGroup ??
this.createGroup({ id: groupId });
let group: DockviewGroupPanel;

if (!isGroupAddedToDom) {
group = referenceGroup;
} else if (options?.overridePopoutGroup) {
group = options.overridePopoutGroup;
} else {
group = this.createGroup({ id: groupId });
this._onDidAddGroup.fire(group);
}

group.model.renderContainer = overlayRenderContainer;
group.layout(
_window.window!.innerWidth,
_window.window!.innerHeight
);

if (!this._groups.has(group.api.id)) {
this._onDidAddGroup.fire(group);
}

if (!options?.overridePopoutGroup && isGroupAddedToDom) {
if (itemToPopout instanceof DockviewPanel) {
this.movingLock(() => {
Expand Down

0 comments on commit 56bdec8

Please sign in to comment.