My cursor gets set only after the drag has completed. I'm not sure why this doesn't work. I've also experimented with setTimeout(fn, 0). The border gets set correctly, but this cursor's effect is seen only after the drag ends. Help is appreciated. Why does cursor not work, while border work correctly? How can I fix this issue? It doesn't work in IE, Chrome and Firefox.
http://jsfiddle.net/t6u3kp9z/1
<div draggable="true" id="x">
Some text.
</div>
var x = document.getElementById("x");
x.ondragstart = function(e) {
e.target.style.cursor="move";
}
x.ondragenter = function(e) {
e.target.style.border = "solid";
e.target.style.cursor="move";
}
x.ondragleave = function(e) {
e.target.style.border = "none";
e.target.style.cursor="move";
}