diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-30 21:26:51 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-30 21:26:51 +0200 |
commit | c3ba120912e1c2240b28d524762e8997f1d6f74a (patch) | |
tree | 6302bb0b485eb9001fc41173a2c2c7a704dc8470 /js/build/app.js | |
parent | 1f65c58534d3cabf35add27c7a903b1f031ba0c7 (diff) |
fix search clear
Diffstat (limited to 'js/build/app.js')
-rw-r--r-- | js/build/app.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/js/build/app.js b/js/build/app.js index 007521016..d95cb18d7 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -2853,13 +2853,11 @@ app.directive('newsSearch', ["$document", "$location", function ($document, $loc var box = $('#searchbox'); box.val($location.search().search); - box.on('keyup', function (e) { - if (e.keyCode === 13) { - var value = $(this).val(); - scope.$apply(function () { - scope.onSearch(value); - }); - } + box.on('search', function () { + var value = $(this).val(); + scope.$apply(function () { + scope.onSearch(value); + }); }); // carry over search on route change |