From 3b9a3aba87385d28de2eb34a42c53b08fce92148 Mon Sep 17 00:00:00 2001 From: Matt Irvine Date: Wed, 2 May 2018 11:43:41 -0700 Subject: [PATCH] Close insights dialog properly when escape is pressed (#1319) --- src/sql/parts/insights/browser/insightsDialogView.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sql/parts/insights/browser/insightsDialogView.ts b/src/sql/parts/insights/browser/insightsDialogView.ts index 6259a38647..897d5ef522 100644 --- a/src/sql/parts/insights/browser/insightsDialogView.ts +++ b/src/sql/parts/insights/browser/insightsDialogView.ts @@ -332,6 +332,10 @@ export class InsightsDialogView extends Modal { this._taskButtonDisposables = []; } + protected onClose(e: StandardKeyboardEvent) { + this.close(); + } + private hasActions(): boolean { return !!(this._insight && this._insight.actions && this._insight.actions.types && this._insight.actions.types.length > 0);