mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-28 12:37:00 +00:00
Prevent DragDrop’s early form submitting
This commit is contained in:
parent
ea3cf9c0f5
commit
e7bbe75f5a
1 changed files with 5 additions and 1 deletions
|
|
@ -90,6 +90,10 @@ export default class DragDrop extends Plugin {
|
|||
e.stopPropagation()
|
||||
})
|
||||
|
||||
this.dropzone.addEventListener('submit', (e) => {
|
||||
e.preventDefault()
|
||||
})
|
||||
|
||||
// Toggle is-dragover state when files are dragged over or dropped
|
||||
Utils.addListenerMulti(this.dropzone, 'dragover dragenter', (e) => {
|
||||
Utils.addClass(this.container, 'is-dragover')
|
||||
|
|
@ -147,7 +151,7 @@ export default class DragDrop extends Plugin {
|
|||
})
|
||||
|
||||
this.dropzone.addEventListener('submit', (e) => {
|
||||
e.preventDefault()
|
||||
|
||||
return resolve(result)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue