Fix key capture on Firefox (#373)

* Add tabindex attribute to svg-keyboard-key to allow focusing the key in Firefox

* Fix typo in svg-keyboard-key.component onKeyUp method
This commit is contained in:
Mikko Lakomaa
2017-07-25 21:59:00 +03:00
committed by László Monda
parent 817daafd18
commit eac588c42c
2 changed files with 2 additions and 1 deletions

View File

@@ -118,7 +118,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
}
@HostListener('keyup', ['$event'])
onKeyUpe(e: KeyboardEvent) {
onKeyUp(e: KeyboardEvent) {
if (this.scanCodePressed) {
e.preventDefault();
this.scanCodePressed = false;

View File

@@ -7,6 +7,7 @@
[width]="key.width" [height]="key.height"
[attr.transform]="'translate(' + key.x + ' ' + key.y + ')'"
[attr.fill]="key.fill"
[attr.tabindex]="0"
[keyAction]="keyActions[i]"
[active]="selected && i == selectedKey.keyId"
[keybindAnimationEnabled]="keybindAnimationEnabled"

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 916 B