Skip to content

Commit

Permalink
fix(universal): to not through on unrecognized Keyboard and Mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Mar 16, 2017
1 parent 8120c88 commit b81e9de
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dropdown/dropdown.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/rating/rating.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/typeahead/typeahead.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b81e9de

Please sign in to comment.