Auto_complete div remains hidden

Hi! I’m using Pat Shaughnessy’s auto_complete fork, working with nested
forms. It’s working very well, producing the right auto complete query
and filling up the auto-complete div (as I can see from firebug). Just,
the div has a style=“display: none;” property always set that’s
preventing it from showing up!
Here is my code:

app/views/letters/_form.html.erb

<% form_for(@letter, :html => {:multipart => true}) do |letter_form| %>
[…]

<% @letter.entities.build unless @letter.entities %> <% letter_form.fields_for :entities do |entity_form| %> <%= render :partial => "entity", :locals => {:f => entity_form} %> <% end %> <%= link_to 'Aggiungi', '#entity', :class => "add_nested_item", :rel => "entities" %>
[...] <% end %>

app/views/letters/_entity.html.erb

<%= f.text_field_with_auto_complete :name, {:size => 35}, {:method => :get, :skip_style => true} %> <%= remove_link_unless_new_record(f) %>

This is the generated HTML code after I type a few letters:

Aggiungi
  • Joseph Ratzinger
Rimuovi

Any suggestion on why the div is not showing up? I tried searching on
the net but could not find anything useful. Thanks!

You just need to change your css to…

style.display=“block” or “inline”

OR

style.display=

The latter might be needed for IE8.

This is a CSS question not a rails question though.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs