diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-01 11:58:11 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-01 12:29:57 -0600 |
commit | 0c49b5eb17a35a3b1929e5dc6decf9a1cc7bd910 (patch) | |
tree | 737bc824943e9ab57d08b4d0e3c751926c3b87d7 /app | |
parent | 0b8b631ad9e914918e51bdb08ad56cd85c333847 (diff) | |
download | gitlab-ce-0c49b5eb17a35a3b1929e5dc6decf9a1cc7bd910.tar.gz |
Fix cancel button not working when uploading a file on the new issue pagejivl-fix-cancel-button-file-upload-new-issue
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, |