Skip to content

Commit

Permalink
Remove this JS
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLeighton21 committed Jul 24, 2023
1 parent 2b83387 commit 530fdf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/ministryofjustice/fb-metadata-presenter.git
revision: 409e39eaa0ce9cc458212f6ca2bb6eb6a069d90d
revision: 7a9b87fdcc0d976eefea3bd8ff96c93f4037bcd1
branch: multi-file-upload
specs:
metadata_presenter (3.0.15)
metadata_presenter (3.1.0)
govspeak (~> 7.1)
govuk_design_system_formbuilder (>= 2.1.5)
json-schema (= 2.8.1)
Expand Down Expand Up @@ -193,7 +193,7 @@ GEM
govuk_personalisation (0.14.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (35.11.0)
govuk_publishing_components (35.12.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/src/shared/multiupload.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
function showFileUpload() {
const addAnotherButton = document.querySelector('[data-multiupload-element="add-another-file"]');
const uploadFile = document.querySelector('[data-multiupload-element="upload-another-file"]');
const fileInput = document.querySelector('input[type="file"]')
// const fileInput = document.querySelector('input[type="file"]')

if(!addAnotherButton) return;
if(!uploadFile) return;

addAnotherButton.style.display = 'none'
uploadFile.removeAttribute('hidden');
if(fileInput) {
setTimeout(fileInput.focus(), 0);
}
// if(fileInput) {
// setTimeout(fileInput.focus(), 0);
// }
}

// So we can just access required functions from the window object
Expand Down

0 comments on commit 530fdf2

Please sign in to comment.