javascript: add some comments to the upload systems

This commit is contained in:
Pierre de La Morinerie 2020-01-08 18:15:03 +01:00
parent 2a1c91a2a5
commit a1083ca253
3 changed files with 10 additions and 1 deletions

View file

@ -27,6 +27,8 @@ addUploadEventListener(INITIALIZE_EVENT, ({ target, detail: { id, file } }) => {
addUploadEventListener(START_EVENT, ({ target, detail: { id } }) => {
ProgressBar.start(id);
// At the end of the upload, the form will be submitted again.
// Avoid the confirm dialog to be presented again then.
const button = target.form.querySelector('button.primary');
if (button) {
button.removeAttribute('data-confirm');