|
|
@ -243,6 +243,7 @@ class UI extends React.PureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleDragOver = (e) => { |
|
|
|
handleDragOver = (e) => { |
|
|
|
|
|
|
|
if (this.dataTransferIsText(e.dataTransfer)) return false; |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
|
|
|
@ -256,6 +257,7 @@ class UI extends React.PureComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleDrop = (e) => { |
|
|
|
handleDrop = (e) => { |
|
|
|
|
|
|
|
if (this.dataTransferIsText(e.dataTransfer)) return; |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
this.setState({ draggingOver: false }); |
|
|
|
this.setState({ draggingOver: false }); |
|
|
@ -279,6 +281,10 @@ class UI extends React.PureComponent { |
|
|
|
this.setState({ draggingOver: false }); |
|
|
|
this.setState({ draggingOver: false }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataTransferIsText = (dataTransfer) => { |
|
|
|
|
|
|
|
return (dataTransfer && Array.from(dataTransfer.types).includes('text/plain') && dataTransfer.items.length === 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
closeUploadModal = () => { |
|
|
|
closeUploadModal = () => { |
|
|
|
this.setState({ draggingOver: false }); |
|
|
|
this.setState({ draggingOver: false }); |
|
|
|
} |
|
|
|
} |
|
|
|