diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-11-02 13:40:18 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-11-02 13:40:18 +0300 |
commit | 95f9f05378cf0e92fb3d3b67a217f8de8cde9227 (patch) | |
tree | 6b84b9e3b1381a67a91c5bf17bd37d9d9de1340e /app | |
parent | dfe6c5390d73aff7b20876c3864524d49be74940 (diff) | |
parent | 0c49b5eb17a35a3b1929e5dc6decf9a1cc7bd910 (diff) |
Merge branch 'jivl-fix-cancel-button-file-upload-new-issue' into 'master'
Fix cancel button not working when uploading a file on the new issue page
Closes #39512
See merge request gitlab-org/gitlab-ce!15137
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dropzone_input.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/assets/javascripts/dropzone_input.js b/app/assets/javascripts/dropzone_input.js index 7a17adcd44e..b7747ee3f83 100644 --- a/app/assets/javascripts/dropzone_input.js +++ b/app/assets/javascripts/dropzone_input.js @@ -119,11 +119,9 @@ export default function dropzoneInput(form) { // removeAllFiles(true) stops uploading files (if any) // and remove them from dropzone files queue. $cancelButton.on('click', (e) => { - const target = e.target.closest('.js-main-target-form').querySelector('.div-dropzone'); - e.preventDefault(); e.stopPropagation(); - Dropzone.forElement(target).removeAllFiles(true); + Dropzone.forElement($formDropzone.get(0)).removeAllFiles(true); }); // If 'error' event is fired, we store a failed files, |