Better fix for file browser race condition (#23882)

(cherry picked from commit 46f5f7a216b0b4069b7b8a11495ad25c9fafa25f)
This commit is contained in:
Charles Gagnon
2023-07-14 14:09:23 -07:00
committed by GitHub
parent 2be85a373f
commit df4847b517

View File

@@ -115,8 +115,7 @@ export class FileBrowserDialog extends Modal {
): void {
this._viewModel.initialize(ownerUri, expandPath, fileFilters, fileValidationServiceType);
this._viewModel.openFileBrowser(0, false).catch(err => onUnexpectedError(err));
this._fileFilterSelectBox.setOptions(this._viewModel.formattedFileFilters);
this._fileFilterSelectBox.select(0);
this._fileFilterSelectBox.setOptions(this._viewModel.formattedFileFilters, 0);
this._filePathInputBox.value = expandPath;
this._isFolderSelected = true;
this.enableOkButton();