When I drag the block but clicking on the image of the div, it is the image that is dragged and not the whole block (and therefore the drop does not work), I want that when the image is dragged the event propagates and it is the whole div that is dragged, this is the HTML code:
<div class="item" id="i1">
<img src="img/camiseta1.jpg" alt="descripción i1"/>
<label class="title">Camiseta 1</label>
<label class="price">20 €</label>
<label class="stock">Stock 10</label>
</div>
This is Javascript
var producto = document.getElementById('i1');
producto.draggable = true;
producto.addEventListener("dragstart", drag);