1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 06:44:16 +00:00

Putting the file out is the same as putting it in a blank space

This commit is contained in:
zxj96
2019-06-21 14:07:52 +08:00
parent 7abc1039b5
commit 9a8da1ac19
2 changed files with 28 additions and 19 deletions

View File

@@ -375,11 +375,12 @@ class DirentListItem extends React.Component {
e.dataTransfer.setData('applicaiton/drag-item-info', dragStartItemData);
}
onItemDragEnter = () => {
onItemDragEnter = (e) => {
if (Utils.isIEBrower()) {
return false;
}
if (this.props.dirent.type === 'dir') {
e.stopPropagation();
this.setState({isDropTipshow: true});
}
}
@@ -392,10 +393,14 @@ class DirentListItem extends React.Component {
e.dataTransfer.dropEffect = 'move';
}
onItemDragLeave = () => {
onItemDragLeave = (e) => {
if (Utils.isIEBrower()) {
return false;
}
if (this.props.dirent.type === 'dir') {
e.stopPropagation();
}
this.setState({isDropTipshow: false});
}
@@ -407,6 +412,9 @@ class DirentListItem extends React.Component {
if (e.dataTransfer.files.length) { // uploaded files
return;
}
if (this.props.dirent.type === 'dir') {
e.stopPropagation();
}
let dragStartItemData = e.dataTransfer.getData('applicaiton/drag-item-info');
dragStartItemData = JSON.parse(dragStartItemData);
if (Array.isArray(dragStartItemData)) { //move items