diff --git a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts index 6fb9023c1114bcd6417132e32f5b6177b5ae8984..2ec0b43a2311eb46b1a412196d9e52b855630186 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsToasts.ts @@ -466,10 +466,18 @@ export class NotificationsToasts extends Themable { } private setVisibility(toast: INotificationToast, visible: boolean): void { - toast.container.style.display = visible ? 'block' : 'none'; + if (this.isVisible(toast) === visible) { + return; + } + + if (visible) { + this.notificationsToastsContainer.appendChild(toast.container); + } else { + this.notificationsToastsContainer.removeChild(toast.container); + } } private isVisible(toast: INotificationToast): boolean { - return toast.container.style.display === 'block'; + return !!toast.container.parentElement; } } \ No newline at end of file