Skip to content

Commit

Permalink
Merge pull request #4 from tomgutz/fix/blank_after_selection
Browse files Browse the repository at this point in the history
fix(keystroke): Added delete keystroke together with backspace
  • Loading branch information
ghiden committed Jun 7, 2014
2 parents 285f621 + 93e3efd commit 735c947
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion angucomplete-alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ angular.module('angucomplete-alt', [] ).directive('angucompleteAlt', ['$parse',
KEY_ES = 27,
KEY_EN = 13,
KEY_BS = 8,
KEY_DEL = 46,
MIN_LENGTH = 3,
PAUSE = 500;

Expand Down Expand Up @@ -301,7 +302,7 @@ angular.module('angucomplete-alt', [] ).directive('angucompleteAlt', ['$parse',
scope.results = [];
scope.showDropdown = false;
scope.$apply();
} else if (event.which === KEY_BS) {
} else if (event.which === KEY_BS || event.which === KEY_DEL) {
scope.selectedObject = null;
scope.$apply();
}
Expand Down

0 comments on commit 735c947

Please sign in to comment.