diff --git a/src/components/popover/popover.component.ts b/src/components/popover/popover.component.ts
index cb7e89db..457ed925 100644
--- a/src/components/popover/popover.component.ts
+++ b/src/components/popover/popover.component.ts
@@ -1,6 +1,6 @@
import {
- Component, ElementRef, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewChild, animate, keyframes,
- state, style, transition, trigger
+ Component, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges, ViewChild,
+ animate, keyframes, state, style, transition, trigger
} from '@angular/core';
import { Store } from '@ngrx/store';
@@ -49,7 +49,7 @@ enum TabName {
transition('opened => closed', [
animate('200ms ease-out', keyframes([
style({ transform: 'translateY(0)', visibility: 'visible', opacity: 1, offset: 0 }),
- style({ transform: 'translateY(30px)', visibility: 'hidden', opacity: 0 , offset: 1 })
+ style({ transform: 'translateY(30px)', visibility: 'hidden', opacity: 0, offset: 1 })
]))
]),
transition('closed => opened', [
@@ -143,6 +143,10 @@ export class PopoverComponent implements OnChanges {
}
}
+ @HostListener('keydown.escape') onEscape(): void {
+ this.cancel.emit();
+ }
+
selectTab(tab: TabName): void {
this.activeTab = tab;
}
@@ -156,7 +160,7 @@ export class PopoverComponent implements OnChanges {
const popover: HTMLElement = this.popoverHost.nativeElement;
let newLeft: number = this.keyPosition.left + (this.keyPosition.width / 2);
- this.leftArrow = newLeft < offsetLeft;
+ this.leftArrow = newLeft < offsetLeft;
this.rightArrow = (newLeft + popover.offsetWidth) > offsetLeft + this.wrapPosition.width;
if (this.leftArrow) {
diff --git a/src/components/popover/widgets/capture-keystroke/capture-keystroke-button.component.ts b/src/components/popover/widgets/capture-keystroke/capture-keystroke-button.component.ts
index 129df98c..0aed29c0 100644
--- a/src/components/popover/widgets/capture-keystroke/capture-keystroke-button.component.ts
+++ b/src/components/popover/widgets/capture-keystroke/capture-keystroke-button.component.ts
@@ -32,6 +32,7 @@ export class CaptureKeystrokeButtonComponent {
if (this.record) {
e.preventDefault();
+ e.stopPropagation();
this.first = false;
if (this.captureService.hasMap(code)) {
diff --git a/src/components/svg/wrap/svg-keyboard-wrap.component.html b/src/components/svg/wrap/svg-keyboard-wrap.component.html
index 9dbc9b9f..6d9e0b2e 100644
--- a/src/components/svg/wrap/svg-keyboard-wrap.component.html
+++ b/src/components/svg/wrap/svg-keyboard-wrap.component.html
@@ -5,7 +5,7 @@
[keybindAnimationEnabled]="keybindAnimationEnabled"
(keyClick)="onKeyClick($event.moduleId, $event.keyId, $event.keyTarget)"
(keyHover)="onKeyHover($event.moduleId, $event.event, $event.over, $event.keyId)">
-