Skip to content

Commit

Permalink
Layout: fixed autocomplete box position
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Kurczewski committed Nov 25, 2013
1 parent f226c3e commit 7820417
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions public_html/media/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7820417

Please sign in to comment.