Skip to content Skip to sidebar Skip to footer

Use Dragstart Preventdefault To Disable Browser Default Image Drag , But It Disable My Drag Event Also

I try to prevent the browser default image drag in dragstart, but somehow it disable the drag and dragend event also. Anyway i can disable the browser default image drag , but it w

Solution 1:

Nowadays you can use event.dataTransfer.clearData() in the dragstart eventlistener to disable the default behaviour but still execute your desired listener.


Post a Comment for "Use Dragstart Preventdefault To Disable Browser Default Image Drag , But It Disable My Drag Event Also"