Fixed explorer drag and drop in firefox
This commit is contained in:
parent
5973a0acc6
commit
d604501974
@ -55,7 +55,7 @@ export default {
|
||||
]),
|
||||
editItem() {
|
||||
const node = this.selectedNode;
|
||||
if (!node.isTrash) {
|
||||
if (!node.isTrash && !node.isTemp) {
|
||||
this.$store.commit('explorer/setEditingId', node.item.id);
|
||||
}
|
||||
},
|
||||
|
@ -134,6 +134,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.$store.commit('explorer/setDragSourceId', this.node.item.id);
|
||||
// Fix for Firefox
|
||||
// See https://stackoverflow.com/a/3977637/1333165
|
||||
evt.dataTransfer.setData('Text', this.node.item.id);
|
||||
},
|
||||
onDrop() {
|
||||
const sourceNode = this.$store.getters['explorer/dragSourceNode'];
|
||||
@ -175,7 +178,7 @@ export default {
|
||||
type: 'separator',
|
||||
}, {
|
||||
name: 'Rename',
|
||||
disabled: this.node.isTrash,
|
||||
disabled: this.node.isTrash || this.node.isTemp,
|
||||
perform: () => this.setEditingId(this.node.item.id),
|
||||
}, {
|
||||
name: 'Delete',
|
||||
|
Loading…
Reference in New Issue
Block a user