Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #8 from ryanhorn/master
Browse files Browse the repository at this point in the history
Fixed issue with down arrow navigation
  • Loading branch information
laktek committed Jun 12, 2011
2 parents da6c831 + f1ea5b0 commit 24a6fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.smart_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
if(current_selection >= 0)
$(options.context).trigger('itemUnfocus', result_suggestions[current_selection] );

if(isNaN(current_selection) || (++current_selection >= result_suggestions.length) )
if(isNaN(current_selection) || null == current_selection || (++current_selection >= result_suggestions.length) )
current_selection = 0;

options['currentSelection'] = current_selection;
Expand Down

0 comments on commit 24a6fca

Please sign in to comment.