I ran into an interesting problem last night trying to implement
Sortable over a unordered list of links, while using Safari to test
the application.

The behaviour was very strange, and went like this:

I could click on an item in the list and drag it up and down within
the boundary of the list.  li elements would move out of the way, as I
expected.  However, when I dropped the item, the wrong even would be
triggered back on the server - the default action would be triggered,
which would refresh the list back to it's original form.  Using
Firefox,  the 'sort' method would be invoked in the controller, as
coded.

After playing around for a while, I found that if I positioned the
element in the correct place in the list, moved the mouse *left* out
of the list, and *then* released the mouse, the correct event would be
triggered, and the 'sort' method would be invoked on the server.

Note that I do not have to do this with Firefox.  I have not tried it
with IE.

Has anyone else ran into this behaviour before, and if so, how did you
solve it?

My first thought was to switch to jQuery, but when I did that, I could
not click on the links to follow them - jQuery interprets the mouse
cilck as the beginning of a drag, and so doesn't less the click go
through to the browser.  That's a complete non-starter.....

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to