mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
fix keyboard focus issues (#16206)
This commit is contained in:
@@ -133,8 +133,8 @@ export class WizardModal extends Modal {
|
||||
this._mpContainer = append(this._body, $('div.dialog-message-and-page-container'));
|
||||
this._pageContainer = append(this._mpContainer, $('div.dialogModal-page-container'));
|
||||
|
||||
this._wizard.pages.forEach(page => {
|
||||
this.registerPage(page);
|
||||
this._wizard.pages.forEach((page, index) => {
|
||||
this.registerPage(page, index === 0); // only do auto-focus for the first page.
|
||||
});
|
||||
this._wizard.onPageAdded(page => {
|
||||
this.registerPage(page);
|
||||
@@ -167,8 +167,8 @@ export class WizardModal extends Modal {
|
||||
});
|
||||
}
|
||||
|
||||
private registerPage(page: WizardPage): void {
|
||||
let dialogPane = new DialogPane(page.title, page.content, valid => page.notifyValidityChanged(valid), this._instantiationService, this._themeService, this._wizard.displayPageTitles, page.description);
|
||||
private registerPage(page: WizardPage, setInitialFocus: boolean = false): void {
|
||||
let dialogPane = new DialogPane(page.title, page.content, valid => page.notifyValidityChanged(valid), this._instantiationService, this._themeService, this._wizard.displayPageTitles, page.description, setInitialFocus);
|
||||
dialogPane.createBody(this._pageContainer);
|
||||
this._dialogPanes.set(page, dialogPane);
|
||||
page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage));
|
||||
|
||||
Reference in New Issue
Block a user