Skip to content

Commit

Permalink
Remove preventDefault for up/down arrow keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidenari Nozaki committed Jun 23, 2014
1 parent 085270f commit edbbc13
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions angucomplete-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,12 @@ angular.module('angucomplete-alt', [] ).directive('angucompleteAlt', ['$parse',

elem.on('keydown', function (event) {
if(event.which === KEY_DW && scope.results) {
event.preventDefault();
if ((scope.currentIndex + 1) < scope.results.length) {
scope.$apply(function() {
scope.currentIndex ++;
});
}
} else if(event.which === KEY_UP && scope.results) {
event.preventDefault();
if (scope.currentIndex >= 1) {
scope.$apply(function() {
scope.currentIndex --;
Expand Down

0 comments on commit edbbc13

Please sign in to comment.