Auto_complete text field not showing drop-down box properly

This may be more of an Ajax question than a Rails question, but I’m
pretty new to Rails and know approximately zero JS. I’d love if
someone could give me a little direction.

I’m using pat shaughnessy’s nested text_field_with_auto_complete
plugin, and it seems to be mostly working properly (after many hours
of fiddling). However, the drop-down box is not displayed properly.
Instead of rendering a box with items that can be highlighted, it’s
just rendering a bulleted list. I can still click on items in the
bullet list, and they’ll fill in the box properly. They also fade away
if I go do something else for too long.

I don’t even know where to begin to look.

Many thanks,

this might sound weird, but in your view of the list try putting
everything on the same line i.e.:

  • somthing
    • Becomes:

      • something

      I think I remember that fixing my problem, although it might not work
      for you.

Hi Mark,

Thanks. I’ll give that a try, but it seems strange that it should even
happen; my view is simply:

<%= auto_complete_result @campuses, :name %>

Shouldn’t that be formatting it correctly?

Sounds to me like you’re missing styling.

I use GitHub - grosser/simple_auto_complete: Rails: Simple, customizable, unobstrusive - Autocomplete that comes with
an example CSS that works just fine for me. That might give you some
clues, but you’ll probably have to modify it to work with the provided
classes and ids.

Found the problem! I was using :skip_style => true in the options for
the text field. When I change that to false, it loads correctly.