From b81e9de784a0542c81021dce8d51b46076d51114 Mon Sep 17 00:00:00 2001 From: Dmitriy Schekhovtsov Date: Fri, 17 Mar 2017 00:32:30 +0200 Subject: [PATCH] fix(universal): to not through on unrecognized Keyboard and Mouse events --- src/dropdown/dropdown.service.ts | 2 +- src/rating/rating.component.ts | 2 +- src/typeahead/typeahead.directive.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dropdown/dropdown.service.ts b/src/dropdown/dropdown.service.ts index 57638a195e..7054072da1 100644 --- a/src/dropdown/dropdown.service.ts +++ b/src/dropdown/dropdown.service.ts @@ -79,7 +79,7 @@ export class DropdownService { }, 0); } - protected keybindFilter(event:KeyboardEvent):void { + protected keybindFilter(event: any):void { if (event.which === 27) { this.openScope.focusToggleElement(); this.closeDropdown(void 0); diff --git a/src/rating/rating.component.ts b/src/rating/rating.component.ts index 429e3da131..307fd25119 100644 --- a/src/rating/rating.component.ts +++ b/src/rating/rating.component.ts @@ -45,7 +45,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit { protected preValue: number; @HostListener('keydown', ['$event']) - public onKeydown(event: KeyboardEvent): void { + public onKeydown(event: any): void { if ([37, 38, 39, 40].indexOf(event.which) === -1) { return; } diff --git a/src/typeahead/typeahead.directive.ts b/src/typeahead/typeahead.directive.ts index 8a7a2b8c8e..4a0552f403 100644 --- a/src/typeahead/typeahead.directive.ts +++ b/src/typeahead/typeahead.directive.ts @@ -148,7 +148,7 @@ export class TypeaheadDirective implements OnInit, OnDestroy { } @HostListener('keydown', ['$event']) - public onKeydown(e: KeyboardEvent): void { + public onKeydown(e: any): void { // no container - no problems if (!this._container) { return;