From 2b33f16a166e2e4b9fd96a1d90c7fe9f3a3c9fe6 Mon Sep 17 00:00:00 2001 From: adrien Date: Sun, 18 Jan 2026 00:30:04 +0100 Subject: [PATCH] le formulaire suit le clavier virtuel --- index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html b/index.html index 6e42cf5..ef597bb 100644 --- a/index.html +++ b/index.html @@ -104,6 +104,7 @@ body > main { const bouton_fermer = document.getElementById('bouton_fermer'); const bouton_annuler = document.getElementById('bouton_annuler'); const bouton_ok = document.getElementById('bouton_ok'); + const footer = document.querySelector('footer'); const langue = "fr-FR"; let voix = null; @@ -206,6 +207,14 @@ body > main { question.focus() }, t); }) + + function onResize() { + footer.style.setProperty("bottom", `${window.innerHeight - window.visualViewport.height}px`); + } + window.visualViewport?.addEventListener('resize', onResize); + window.addEventListener('resize', onResize); + onResize(); +