From 96720e06096f2569b36aad9b75dffb2978a7eb42 Mon Sep 17 00:00:00 2001 From: Zebsterpasha <77332790+Zebsterpasha@users.noreply.github.com> Date: Wed, 22 Feb 2023 19:59:38 +0300 Subject: [PATCH] Fix VSCode modal message focus (#12206) --- .../src/main/browser/dialogs/modal-notification.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts b/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts index abe3ee6002d35..0d42eb1600850 100644 --- a/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts +++ b/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts @@ -77,8 +77,10 @@ export class ModalNotification extends AbstractDialog { detailElement.textContent = options.detail; } - actions.forEach((action: MainMessageItem) => { - const button = this.createButton(action.title); + actions.forEach((action: MainMessageItem, index: number) => { + const button = index === 0 + ? this.appendAcceptButton(action.title) + : this.createButton(action.title); button.classList.add('main'); this.controlPanel.appendChild(button); this.addKeyListener(button,