Fix wizard not displaying error messages (#8545)

This commit is contained in:
Charles Gagnon
2019-12-03 17:40:19 -08:00
committed by GitHub
parent 7f16a4d857
commit 6cce532ca4
2 changed files with 25 additions and 12 deletions

View File

@@ -481,19 +481,23 @@ export abstract class Modal extends Disposable implements IThemable {
this._messageDetail.innerText = description;
}
DOM.removeNode(this._messageDetail);
if (this._messageSummaryText) {
if (this._useDefaultMessageBoxLocation) {
DOM.prepend(this._modalContent, (this._messageElement));
}
} else {
// Set the focus manually otherwise it'll escape the dialog to something behind it
this.setInitialFocusedElement();
DOM.removeNode(this._messageElement);
}
this.messagesElementVisible = !!this._messageSummaryText;
this.updateExpandMessageState();
}
}
protected set messagesElementVisible(visible: boolean) {
if (visible) {
if (this._useDefaultMessageBoxLocation) {
DOM.prepend(this._modalContent, (this._messageElement));
}
} else {
// Set the focus manually otherwise it'll escape the dialog to something behind it
this.setInitialFocusedElement();
DOM.removeNode(this._messageElement);
}
}
/**
* Set spinner element to show or hide
*/