Drag&drop strangeness

hi people!

I have a view like this:


    <%= render "contacts/search_fields" %>
    trash me
<%= drop_receiving_element "search", :update => "searchfields", :url => { :action => "add_search_field" } %> <%= drop_receiving_element "trash", :update => "searchfields", :url => { :action => "remove_search_field" } %>

and another view that is the ‘ajax’ rendered view:


<% session[:search_fields].each do |field, surely_empty| %>

  • <%= field
    %>:<%= text_field_tag field %>

  • <%= draggable_element field, :revert => true %>
    <% end %>

    add_search_field and remove_search_field are removing from the session a
    field and search_fields.rhtml as you see reprints all the fields

    I want to trash a field by moving it to the trash div.

    steps are the following:

    I have a table with a <%= draggable_element column.human_name.downcase,
    :revert => true %> and if I drag it to search_fields (it calls
    add_search_field in the controller) it works and renders correctly.

    then if I try to drag the newly added field to trash I’m unable to do it
    because it doesn’t drag. If I reload the page and then drag&drop it

    what am I missing?


    a hack that could be done, but I don’t know how to do it is to force the
    of the entire page


    ,= ,--. =.
    /)o o(_)) jabber:[email protected]/msn:[email protected]
    -'(. .)-’ online on #muppetslab at irc.freenode.net
    _/ There’s no one inside that flat, everybody knows it