From 8042b78f1e63629fbfeacafe88e10aa0eff7d885 Mon Sep 17 00:00:00 2001 From: Cory Rivera Date: Wed, 22 Aug 2018 12:12:33 -0700 Subject: [PATCH] Check whether page is valid before enabling next button. (#2293) --- src/sql/platform/dialog/wizardModal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/platform/dialog/wizardModal.ts b/src/sql/platform/dialog/wizardModal.ts index ba9777406f..0a7bf90461 100644 --- a/src/sql/platform/dialog/wizardModal.ts +++ b/src/sql/platform/dialog/wizardModal.ts @@ -197,8 +197,9 @@ export class WizardModal extends Modal { if (this._nextButton && this._doneButton) { if (this._wizard.pages[index + 1]) { + let isPageValid = this._wizard.pages[index] && this._wizard.pages[index].valid; this._nextButton.element.parentElement.classList.remove('dialogModal-hidden'); - this._nextButton.enabled = this._wizard.pages[index + 1].enabled; + this._nextButton.enabled = isPageValid && this._wizard.pages[index + 1].enabled; this._doneButton.element.parentElement.classList.add('dialogModal-hidden'); } else { this._nextButton.element.parentElement.classList.add('dialogModal-hidden');