Close insights dialog properly when escape is pressed (#1319)

This commit is contained in:
Matt Irvine
2018-05-02 11:43:41 -07:00
committed by GitHub
parent f0c986858a
commit 3b9a3aba87

View File

@@ -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);