Skip to content

Commit

Permalink
fixed setting the character length correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
laktek committed Mar 8, 2011
1 parent a95ce10 commit cfc9415
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions jquery.smart_autocomplete.js
Expand Up @@ -292,6 +292,9 @@

//set item selected property
options.setItemSelected(true);

//set number of current chars in field
options.originalCharCount = $(context).val().length;

//trigger lost focus
$(context).trigger('lostFocus');
Expand Down Expand Up @@ -432,10 +435,6 @@

//check minimum number of characters are typed
if(current_char_count >= options.minCharLimit){

//set number of current chars in field
options.originalCharCount = current_char_count;

$(options.context).trigger('keyIn', [$(this).val()]);
}
else{
Expand Down

0 comments on commit cfc9415

Please sign in to comment.