Skip to content

Commit

Permalink
Fix: Change fileInput's files value
Browse files Browse the repository at this point in the history
on drag and drop. #71
  • Loading branch information
alessiomaffeis committed Jul 20, 2023
1 parent 45e4c04 commit 44d42ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PictureInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ export default {
},
onFileDrop (e) {
this.onDragLeave()
this.$refs.fileInput.files = e.target.files || e.dataTransfer.files
this.onFileChange(e)
},
onFileChange (e, prefill) {
let files = e.target.files || e.dataTransfer.files
const files = e.target.files || e.dataTransfer.files
if (!files.length) {
return
}
Expand Down

0 comments on commit 44d42ae

Please sign in to comment.