le formulaire suit le clavier virtuel

This commit is contained in:
2026-01-18 00:30:04 +01:00
parent c6be8c545d
commit 2b33f16a16

View File

@@ -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();
</script>
</body>