space key as click (#8437)

This commit is contained in:
Alan Ren
2019-11-22 11:24:28 -08:00
committed by GitHub
parent 632ca0685e
commit b333788c3c

View File

@@ -41,7 +41,7 @@ export default class CardComponent extends ComponentWithIconBase implements ICom
this._register(this.themeService.onDidColorThemeChange(this.updateTheme, this));
this.updateTheme(this.themeService.getColorTheme());
this.onkeydown(this._el.nativeElement, (e: StandardKeyboardEvent) => {
if (e.keyCode === KeyCode.Enter) {
if (e.keyCode === KeyCode.Enter || e.keyCode === KeyCode.Space) {
this.onCardClick();
DOM.EventHelper.stop(e, true);
}