@@ -226,6 +226,7 @@ export interface IDockviewComponent extends IBaseGrid<DockviewGroupPanel> {
226226 readonly onDidMaximizedGroupChange : Event < DockviewMaximizedGroupChanged > ;
227227 readonly onDidPopoutGroupSizeChange : Event < PopoutGroupChangeSizeEvent > ;
228228 readonly onDidPopoutGroupPositionChange : Event < PopoutGroupChangePositionEvent > ;
229+ readonly onDidBlockPopout : Event < void > ;
229230 readonly options : DockviewComponentOptions ;
230231 updateOptions ( options : DockviewOptions ) : void ;
231232 moveGroupOrPanel ( options : MoveGroupOrPanelOptions ) : void ;
@@ -319,6 +320,9 @@ export class DockviewComponent
319320 readonly onDidPopoutGroupPositionChange : Event < PopoutGroupChangePositionEvent > =
320321 this . _onDidPopoutGroupPositionChange . event ;
321322
323+ private readonly _onDidBlockPopout = new Emitter < void > ( ) ;
324+ readonly onDidBlockPopout : Event < void > = this . _onDidBlockPopout . event ;
325+
322326 private readonly _onDidLayoutFromJSON = new Emitter < void > ( ) ;
323327 readonly onDidLayoutFromJSON : Event < void > = this . _onDidLayoutFromJSON . event ;
324328
@@ -505,6 +509,7 @@ export class DockviewComponent
505509 this . _onDidOptionsChange ,
506510 this . _onDidPopoutGroupSizeChange ,
507511 this . _onDidPopoutGroupPositionChange ,
512+ this . _onDidBlockPopout ,
508513 this . onDidViewVisibilityChangeMicroTaskQueue ( ( ) => {
509514 this . updateWatermark ( ) ;
510515 } ) ,
@@ -715,6 +720,7 @@ export class DockviewComponent
715720
716721 if ( popoutContainer === null ) {
717722 popoutWindowDisposable . dispose ( ) ;
723+ this . _onDidBlockPopout . fire ( ) ;
718724 return false ;
719725 }
720726
@@ -734,7 +740,7 @@ export class DockviewComponent
734740 const referenceLocation = itemToPopout . api . location . type ;
735741
736742 /**
737- * The group that is being added doesn't already exist within the DOM, the most likely occurance
743+ * The group that is being added doesn't already exist within the DOM, the most likely occurrence
738744 * of this case is when being called from the `fromJSON(...)` method
739745 */
740746 const isGroupAddedToDom =
0 commit comments