views:

25

answers:

1

Hello

What is the default action happening when we drag over an image ?

When I drag over an image the cursor changes to a black circle with a line inside (in Firefox) I could block it by the code e.preventDefault() using jquery, but I didn't understand what is the default action happening when I drag over an image.

Thanks

+1  A: 

The browser is telling you that the element over which you are hovering is not a drop target for the item being dragged.

jqueryui does implement draggable elements nicely and I believe they may handle that issue for you.

http://jqueryui.com/demos/draggable/

If you are trying to prevent drag or selection this post answers that: http://stackoverflow.com/questions/2744631/making-an-element-unselectable-using-jquery

j0tt
I am not dropping any element, this is happening when I just drag over the image
john
If you are clicking and dragging the image Firefox is actually allowing you to drag it so you can take it and drop it on your desktop or anywhere else that accepts an image as content. You are getting the black circle when you are over the image itself because you can't drop it on itself.
j0tt