diff --git a/frontend/src/Metamaps/PasteInput.js b/frontend/src/Metamaps/PasteInput.js index b72ae545..03a92f86 100644 --- a/frontend/src/Metamaps/PasteInput.js +++ b/frontend/src/Metamaps/PasteInput.js @@ -20,6 +20,10 @@ const PasteInput = { }, false) window.addEventListener('drop', function(e) { e = e || window.event + + // prevent conflict with react-dropzone file uploader + if (event.target.id !== 'infovis-canvas') return + e.preventDefault() var coords = Util.pixelsToCoords(Visualize.mGraph, { x: e.clientX, y: e.clientY }) if (e.dataTransfer.files.length > 0) { diff --git a/frontend/src/components/ImportDialogBox.js b/frontend/src/components/ImportDialogBox.js index 85b3ee67..6c2d7413 100644 --- a/frontend/src/components/ImportDialogBox.js +++ b/frontend/src/components/ImportDialogBox.js @@ -14,6 +14,7 @@ class ImportDialogBox extends Component { } handleFile = (files, e) => { + e.preventDefault() // prevent it from triggering the default drag-drop handler this.props.onFileAdded(files[0]) }