From 782041718873bb76c2de7425e3db8a9a70b3b43a Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 25 Nov 2013 21:51:31 +0100 Subject: [PATCH] Layout: fixed autocomplete box position --- public_html/media/js/core.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public_html/media/js/core.js b/public_html/media/js/core.js index a4b4b8eb..1dc61c19 100644 --- a/public_html/media/js/core.js +++ b/public_html/media/js/core.js @@ -19,7 +19,7 @@ function getCookie(name) return null; start = value.indexOf('=', start) + 1; - var end = value.indexOf(";", start); + var end = value.indexOf(';', start); if (end == -1) end = value.length; @@ -211,14 +211,19 @@ $(function() var searchInput = $(this); searchInput // don't navigate away from the field on tab when selecting an item - .bind("keydown", function(event) + .bind('keydown', function(event) { - if (event.keyCode === $.ui.keyCode.TAB && $(this).data("autocomplete").menu.active) + if (event.keyCode === $.ui.keyCode.TAB && $(this).data('autocomplete').menu.active) { event.preventDefault(); } }).autocomplete({ minLength: 1, + position: + { + my: 'right top', + at: 'right bottom' + }, source: function(request, response) { var term = extractLast(request.term);