mercredi 26 mars 2014

Prevent browser default image drag

Hi,



I have a UI with an image on it. A user can start a drag / drop operation by dragging this image. This image element has a Ext.dd.DragZone attached to it. Depending on the state the drag can be started or not. When the state allows the drag operation, the dragZone.getDragData function is used to provide the drag data, so far so good.

But when the state does not allow a drag / drop operation, the dragZone.getDragData returns false. The Ext drag operation is not started ( = ok). But the browsers drag kicks in (default drag / drop of a picture in the browser) and picks the image up.



How can I prevent this default browser image drag?




Aucun commentaire:

Enregistrer un commentaire