diff --git a/examples/demo.css b/examples/demo.css index 9c913ea7..6f2fcf2f 100644 --- a/examples/demo.css +++ b/examples/demo.css @@ -78,7 +78,8 @@ body > .container-fluid { } .hover { - background: #eee; + border: 4px dashed #888888; + background: #F0F0F0; } .step { diff --git a/src/ui/SetInputStep.js b/src/ui/SetInputStep.js index c4536bc7..052e9ff2 100644 --- a/src/ui/SetInputStep.js +++ b/src/ui/SetInputStep.js @@ -114,10 +114,10 @@ function setInputStepInit() { dropzone[0].addEventListener('drop', handleFile, false); dropzone.on('dragover', function onDragover(e) { - e.stopPropagation(); + dropzone.addClass('hover'); e.preventDefault(); - e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy. - }, false); + e.stopPropagation(); + }); dropzone.on('dragenter', function onDragEnter(e) { dropzone.addClass('hover'); @@ -127,6 +127,11 @@ function setInputStepInit() { dropzone.removeClass('hover'); }); + dropzone.on('drop', function onDrop(e) { + dropzone.removeClass('hover'); + e.preventDefault(); + }); + }; }