From: Joris Steyn <jorissteyn@gmail.com> Currently, one has to press enter twice in order to submit the package search form with typeahead completion. Add a workaround to fix this. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/html/home.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/html/home.php b/web/html/home.php index e80efaa..62c246a 100644 --- a/web/html/home.php +++ b/web/html/home.php @@ -124,6 +124,15 @@ $(document).ready(function() { return item; } }).attr('autocomplete', 'off'); + + $('#pkgsearch-field').keydown(function(e) { + if (e.keyCode == 13) { + var selectedItem = $('ul.pkgsearch-typeahead li.active'); + if (selectedItem.length == 0) { + $('#pkgsearch-form').submit(); + } + } + }); }); </script> <?php -- 1.8.5.2