0

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

john
  • 535
  • 7
  • 23

1 Answers1

1

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: Making an element unselectable using jQuery

Community
  • 1
  • 1
j0tt
  • 1,108
  • 1
  • 7
  • 16
  • I am not dropping any element, this is happening when I just drag over the image – john Aug 21 '10 at 17:50
  • 1
    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 Aug 21 '10 at 17:53