I've got a "Sortable" list that is sorting just fine. But in the list
items, there is a link. If you mousedown on the link, drag it to a
new location and mouseup, the list gets reordered appropriately, but
then the link is followed (you did - after all - click it). Is there
a way to either stop the mouseup/click event before activating the
link after you've dragged the item, or to not drag at all with the
link, that is, not have the link as part of the handle?
For another project, I'm trying to use a nested list that is a
Sortable with {tree:true}, but also have the elements collapse when
clicked, and I'm running across the same problem there: an open branch
will collapse after being moved (and vise versa), because it is also
registering the click.
Any ideas?
on 2008-07-01 19:25
on 2008-07-02 11:04
On Jul 1, 6:24 pm, Jay K <jhkni...@gmail.com> wrote: > clicked, and I'm running across the same problem there: an open branch > will collapse after being moved (and vise versa), because it is also > registering the click. > > Any ideas? I've not used Sortable much, but IIRC the whole point of using it is that it handles the dropping for you. If you used your own onDrop callback, then I guess you could do an Event.stop, but I don't think there's anywhere you could put that in with Sortable. Sorry.
on 2008-07-02 16:38
On Jul 2, 4:04 am, ColinFine <colin.f...@pace.com> wrote: > > For another project, I'm trying to use a nested list that is a > there's anywhere you could put that in with Sortable. Sorry. What I've done to get around this is to absorb the click and redefine it by activating the link if the mousedown and mouseup are within .25 seconds. It's way hackier than I like, but it seems to work.