diff --git a/src/sql/workbench/services/dialog/browser/wizardNavigation.component.ts b/src/sql/workbench/services/dialog/browser/wizardNavigation.component.ts index a5905dfd34..6ce6516821 100644 --- a/src/sql/workbench/services/dialog/browser/wizardNavigation.component.ts +++ b/src/sql/workbench/services/dialog/browser/wizardNavigation.component.ts @@ -10,6 +10,8 @@ import { Wizard } from '../common/dialogTypes'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; export class WizardNavigationParams implements IBootstrapParams { wizard!: Wizard; @@ -24,8 +26,8 @@ export class WizardNavigationParams implements IBootstrapParams {
- - {{i+1}} + + {{i+1}}
@@ -74,6 +76,15 @@ export class WizardNavigation implements AfterViewInit { } } + onKey(e: KeyboardEvent, index: number): void { + const event = new StandardKeyboardEvent(e); + if (event.equals(KeyCode.Space) || event.equals(KeyCode.Enter)) { + this.navigate(index); + e.preventDefault(); + e.stopPropagation(); + } + } + private style(): void { let theme = this._themeService.getColorTheme(); let navigationBackgroundColor = theme.getColor(SIDE_BAR_BACKGROUND);