From 64cee645168637ce8fe3bc511f363c94b0d871ad Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Wed, 7 Jul 2021 13:45:07 -0700 Subject: [PATCH] make the toolbar items keyboard focusable (#16017) * make the toolbar items keyboard focusable * add comment --- src/sql/base/browser/ui/taskbar/actionbar.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sql/base/browser/ui/taskbar/actionbar.ts b/src/sql/base/browser/ui/taskbar/actionbar.ts index 71ecbe1245..c997dddd9a 100644 --- a/src/sql/base/browser/ui/taskbar/actionbar.ts +++ b/src/sql/base/browser/ui/taskbar/actionbar.ts @@ -238,6 +238,13 @@ export class ActionBar extends ActionRunner implements IActionRunner { //this.addEmitter(item); item.render(actionItemElement); + // VSCode toolbar now will only receive one tab stop, by default all items are not focusable. + // Adding the following change to make sure the ADS toolbars are keyboard focusable to match the previous behavior as a temporary solution. + // TODO: https://github.com/microsoft/azuredatastudio/issues/16016 + if (item instanceof BaseActionViewItem) { + item.setFocusable(true); + } + if (index === null || index < 0 || index >= this._actionsList.children.length) { this._actionsList.appendChild(actionItemElement); } else {