diff --git a/index.html b/index.html index 09787bd..82049be 100644 --- a/index.html +++ b/index.html @@ -191,7 +191,6 @@ formulaire.addEventListener('submit', async (e) => { const citation = document.createElement('article'); citation.innerText = formulaireData.get('question'); conversation.appendChild(citation); - formulaire.reset(); let paragraphe = document.createElement('p'); paragraphe.setAttribute("aria-busy", "true"); @@ -210,7 +209,7 @@ formulaire.addEventListener('submit', async (e) => { paragraphe.setAttribute('aria-busy', 'false'); paragraphe = document.createElement('p'); - paragraphe.innerHTML = "😿 Je ne suis pas disponible pour le moment. Merci de laisser un message !"; + paragraphe.innerHTML = "😿 Je ne suis pas disponible pour le moment. Merci de laisser un message !"; favicon.href = 'cat-tears.svg'; conversation.appendChild(paragraphe); document.scrollingElement.scrollBy({top: window.visualViewport.height, behavior: 'smooth'}); @@ -224,6 +223,7 @@ formulaire.addEventListener('submit', async (e) => { return } + formulaire.reset(); paragraphe.setAttribute('aria-busy', 'false'); nb_reponses++;