I'm trying to create a drag-and-drop application using vanilla JS.
Example: https://codepen.io/dever52/pen/MWrJxrL
However, this only works with a mouse. So i can't drag the element on a touch-device.
I've tried using the ontouchstart and ontouchend event to be able to use it on touch devices, but this doesn't work (see comments in the codepen) as expected. Is there a way how to make this work for touch devices?