dino d.
2010-Feb-09 20:18 UTC
auto_complete always selects the first item, can i prevent this?
if you use google or yahoo''s search autocomplete, you''ll see that they do not select the first item automatically. this way, if you don''t choose an item, and hit return, the return submits the form. is there a way to make this work with auto_complete? in other words, i''d like it to behave like this- user types in some text, auto_complete div gets filled with list, nothing is hightlighted in the list until the user mouses or clicks the down key. if something is selected, hitting return selects that item, if not, hitting return submits what they typed. any ideas? hopefully this is something simple. thanks, dino -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dino d.
2010-Feb-09 21:06 UTC
Re: auto_complete always selects the first item, can i prevent this?
i did find this solution, but i''m not crazy about it: https://prototype.lighthouseapp.com/projects/8887/tickets/116-ajaxautocompleter-default-selects-first-item On Feb 9, 3:18 pm, "dino d." <dinodorr...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> if you use google or yahoo''s search autocomplete, you''ll see that they > do not select the first item automatically. this way, if you don''t > choose an item, and hit return, the return submits the form. is there > a way to make this work with auto_complete? > > in other words, i''d like it to behave like this- user types in some > text, auto_complete div gets filled with list, nothing is hightlighted > in the list until the user mouses or clicks the down key. if > something is selected, hitting return selects that item, if not, > hitting return submits what they typed. > > any ideas? hopefully this is something simple. > > thanks, > dino-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.