javascript: fix clicking on the icon of the auto-upload Retry button
When clicking on the icon, `event target` would be the icon, not the button. However delegates configures `this` to be the requested event target.
This commit is contained in:
parent
aa2d99ef33
commit
38b0bd645c
1 changed files with 2 additions and 2 deletions
|
@ -16,8 +16,8 @@ delegate('change', fileInputSelector, event => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const retryButtonSelector = `button.attachment-error-retry`;
|
const retryButtonSelector = `button.attachment-error-retry`;
|
||||||
delegate('click', retryButtonSelector, event => {
|
delegate('click', retryButtonSelector, function() {
|
||||||
const inputSelector = event.target.dataset.inputTarget;
|
const inputSelector = this.dataset.inputTarget;
|
||||||
const input = document.querySelector(inputSelector);
|
const input = document.querySelector(inputSelector);
|
||||||
startUpload(input);
|
startUpload(input);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue