kensnyder / quill-image-drop-module

A module for Quill rich text editor to allow images to be pasted and drag/dropped into the editor.
216 stars 78 forks source link

Module prevents internal document text drag and drop #12

Open johnnymaxwell opened 6 years ago

johnnymaxwell commented 6 years ago

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();