Skip to content

Commit

Permalink
Fix return fall on keydown
Browse files Browse the repository at this point in the history
Ref. #158
  • Loading branch information
indrimuska committed Apr 9, 2017
1 parent 73cd610 commit ade450c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ export default class Directive implements ng.IDirective {
$scope.input
.on('focus click', () => $scope.$evalAsync($scope.view.open))
.on('blur', () => $scope.$evalAsync($scope.view.close))
.on('keydown', (e) => $scope.keyboard && $scope.$evalAsync(() => $scope.view.keydown(e)));
.on('keydown', (e) => {
if ($scope.keyboard) $scope.$evalAsync(() => $scope.view.keydown(e))
});
$scope.contents.on('click', () => focusInput());
$scope.container.on('mousedown', (e: JQueryEventObject) => focusInput(e));
angular.element(this.$window).on('resize scroll', $scope.view.position);
Expand Down

0 comments on commit ade450c

Please sign in to comment.