Skip to content

Commit

Permalink
Revert "Update client-src\digitize\index.js: Fix #262"
Browse files Browse the repository at this point in the history
This reverts commit bb0673a.
  • Loading branch information
mhhd2020 committed Jul 11, 2023
1 parent 02ff170 commit 58c5079
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions client-src/digitize/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,3 @@ document.forms.namedItem("upload").onsubmit = () => {
setDisabled("submitBtn", true);
setIsBusy("submitBtn", true);
};

// In case the page is newly loaded, reset the upload button, the spinner, and the upload field.
// This prevents unexpected behaviour when clicking the back button after an upload.
window.addEventListener("pageshow", () => {
setDisabled("submitBtn", true);
setIsBusy("submitBtn", false);

// Remove all previously selected files. The used file selector (filebokz) seems not to
// provide a working solution to remove all selected files at once.
const removeButtons = document.getElementsByClassName("remove");
for (let i = removeButtons.length - 1; i >= 0; i--) {
removeButtons[i].click();
}
});

0 comments on commit 58c5079

Please sign in to comment.