Skip to content

Commit

Permalink
prevent multiple openings for popover
Browse files Browse the repository at this point in the history
  • Loading branch information
Pop John committed Oct 24, 2024
1 parent bedc118 commit 7b54710
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ export class MsTerminalToolbarComponent implements OnInit, OnDestroy {
}

public openPanel(origin: MatIconButton) {
if (!isNil(this.searchPanelRef)) {
return;
}

this.searchPanelRef = this.popoverService.open(MsTerminalToolbarSearchPopoverComponent, origin._elementRef, {
position: !this.isFullscreen ? 'top' : 'bottom',
width: '200px',
Expand Down Expand Up @@ -127,6 +131,7 @@ export class MsTerminalToolbarComponent implements OnInit, OnDestroy {
return;
}

this.searchPanelRef?.close();
this.terminalDialogService.openFullScreenDialog(this.isFullscreen);
}

Expand Down

0 comments on commit 7b54710

Please sign in to comment.