Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

brent's Profile

GitHub User: brentmulligan

Comments by brent

Avatar

an issue i noticed with this was that when typing in a name that was in the database the autocomplete field would not highlight the name. if you did not physically click on the name that popped up and you simply added a comma or tabbed over it was treated as a new entry (the id wasn't added to to the token field, just the name). i solved this by going to line 1012 in the JS file and changing:

javascript
if(settings.allowCustomEntry == true) {
                    if(index === 0) {
                        select_dropdown_item(this_li);
                    }
                }

to just simply

javascript
   if(index === 0) {
                        select_dropdown_item(this_li);
                    }

When using Custom Data Entry you aren't getting that statement and that seemed to stop it from auto selecting the best match. Not exactly sure I did that this the best way but it appears to be working properly now.