Skip to content

Commit

Permalink
fix(pollinators): disable "next picture" button while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgw committed Dec 18, 2023
1 parent 0c9ad7d commit 8212e27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pollinators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ async function getGuessData (taxon) {

selection.onsubmit = async function (e) {
e.preventDefault()
const submitButton = selection.querySelector('button[type="submit"]')
submitButton.disabled = true

delete selection.images.dataset.success
while (selection.images.firstChild) {
Expand Down Expand Up @@ -265,6 +267,8 @@ selection.onsubmit = async function (e) {
figure.appendChild(figcaption)

selection.images.appendChild(figure)

submitButton.disabled = false
}

function createTaxonLabel (taxon) {
Expand Down

0 comments on commit 8212e27

Please sign in to comment.