From bceb766d2878733eebdabdac9b25c609056354ec Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Tue, 10 Dec 2019 16:59:15 -0800 Subject: [PATCH] Notebooks: Fix Cancel for Connection Dialog to Actually Close Window (#8626) * Fix connection dialog not going away on cancel * Remove unnecessary change --- .../workbench/contrib/notebook/browser/notebookActions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sql/workbench/contrib/notebook/browser/notebookActions.ts b/src/sql/workbench/contrib/notebook/browser/notebookActions.ts index 314aaf19ed..8157125136 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookActions.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookActions.ts @@ -364,8 +364,10 @@ export class AttachToDropdown extends SelectBox { let attachToConnections = this.values; if (!connection) { - this.loadAttachToDropdown(this.model, this.getKernelDisplayName()); - this.doChangeContext(undefined, true); + // If there is no connection, we should choose the previous connection, + // which will always be the first item in the list. Either "Select Connection" + // or a real connection name + this.select(0); return false; } let connectionUri = this._connectionManagementService.getConnectionUri(connection);