The MDN specification, and every site I can find on Google, says that all HTML elements can be dragged and dropped. However, in practice, I found that I can not drag text inputs or text fields, even if they are disabled.
For example, with the following code:
<img src="http://www.placehold.it/350x150" draggable alt="Placeholder image">
<a href="http://example.com" draggable>Link</a>
<input type="text" draggable>
<input type="text" disabled draggable>
I can drag the image and link, but none of the inputs can be dragged.
Here is jsfiddle
Can I drag inputs using the HTML5 drag attribute? If not, is there a workaround I could use?
source
share