Sometimes users accidentally drag an HTML element into an editable area. This can be prevented by adding draggable="false"
as an attribute to the element.
Examples
Draggable
<a href="https://example.com">draggable example</a>
<img src="avatar.jpg" alt="Sal" width="150" height="150" />
Undraggable
<a draggable="false" href="https://example.com">draggable example</a>
<img draggable="false" src="avatar.jpg" alt="Sal" width="150" height="150" />
More Details
See MDN draggable.
See browser support for draggable at Can I Use….
Leave a Reply