diff --git a/src/vs/sessions/contrib/automations/browser/automationDialogService.ts b/src/vs/sessions/contrib/automations/browser/automationDialogService.ts index 192f2c5b5e5e9..0fed1d6a25920 100644 --- a/src/vs/sessions/contrib/automations/browser/automationDialogService.ts +++ b/src/vs/sessions/contrib/automations/browser/automationDialogService.ts @@ -6,7 +6,7 @@ import * as DOM from '../../../../base/browser/dom.js'; import { IButton } from '../../../../base/browser/ui/button/button.js'; import { Dialog } from '../../../../base/browser/ui/dialog/dialog.js'; -import { DisposableStore } from '../../../../base/common/lifecycle.js'; +import { DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js'; import { localize } from '../../../../nls.js'; import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; @@ -89,8 +89,9 @@ export class AutomationDialogService implements IAutomationDialogService { localize('automation.dialog.cancel', "Cancel"), ]; + const activeContainer = this.layoutService.activeContainer; const dialog = disposables.add(new Dialog( - this.layoutService.activeContainer, + activeContainer, title, buttonLabels, createWorkbenchDialogOptions({ @@ -133,6 +134,9 @@ export class AutomationDialogService implements IAutomationDialogService { }, this.keybindingService, this.layoutService, this.hostService), )); + activeContainer.classList.add('automation-dialog-open'); + disposables.add(toDisposable(() => activeContainer.classList.remove('automation-dialog-open'))); + try { const result = await dialog.show(); if (result.button !== 0) { diff --git a/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css b/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css index c235ca03e96b4..3812224c6f2bb 100644 --- a/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css +++ b/src/vs/workbench/contrib/chat/browser/aiCustomization/media/aiCustomizationManagement.css @@ -2348,20 +2348,18 @@ pane is first mounted. View switches inside the modal are not animated. */ * contextview.ts as `2575 + layer`). DOM order means the dialog * shows on top, hiding any popup the chat input chips, the quick * input, or a context menu try to open. We can't change the inline - * z-index from outside, so use `!important` on rules scoped to - * `body:has(.automation-dialog)`. They only apply while the - * automations dialog is on screen, so other dialogs' popup stacking - * is untouched. + * z-index from outside, so use `!important` while the dialog service + * marks the active container as automation-dialog-open. */ -body:has(.automation-dialog) .context-view.monaco-component { +.automation-dialog-open .context-view.monaco-component { z-index: 2600 !important; } -body:has(.automation-dialog) .quick-input-widget { +.automation-dialog-open .quick-input-widget { z-index: 2600 !important; } -body:has(.automation-dialog) .monaco-menu-container { +.automation-dialog-open .monaco-menu-container { z-index: 2600 !important; } @@ -2858,4 +2856,4 @@ body:has(.automation-dialog) .monaco-menu-container { overflow: hidden; text-overflow: ellipsis; max-width: 240px; -} \ No newline at end of file +}