preventing click event on a dragable anchor element

12 views
Skip to first unread message

gadfly16

unread,
Dec 14, 2009, 7:09:31 PM12/14/09
to threedubmedia
Hi,

I have a dragable element which has an anchor element in it. If one
starts the drag in this element it gets fired at the end of the drag.
I would like to prevent this, and let the anchor open a new tab only
if it is 'just' clicked but not dragged. I tried to put
event.preventDefault() to the event handlers, but it didn't solve the
problem. what do I miss here?

cheers
bmt

3wme

unread,
Dec 15, 2009, 2:09:33 PM12/15/09
to threedubmedia
I would recommend using another element to mask the click by
positioning it under the mouse during the drag interaction. You could
use the "dragProxy" to simplify this, but keep in mind the size of the
proxy element is used to calculate drop target intersections.

http://jsbin.com/ozaju
Reply all
Reply to author
Forward
0 new messages