If your text has " hello world" and you try to drag 'world' to the left of 'hello', nothing happens.
Moving t.preventDefault(); into the IF block fixes this.
key: "handleDrop",
value: function e(t) {
// comment t.preventDefault();
if (t.dataTransfer && t.dataTransfer.files && t.dataTransfer.files.length) {
// new line
t.preventDefault();
If your text has " hello world" and you try to drag 'world' to the left of 'hello', nothing happens. Moving t.preventDefault(); into the IF block fixes this.
key: "handleDrop", value: function e(t) { // comment t.preventDefault(); if (t.dataTransfer && t.dataTransfer.files && t.dataTransfer.files.length) { // new line t.preventDefault();