From be227f4a2f9ecbc72e4c83b9925f9685f0bb7ae3 Mon Sep 17 00:00:00 2001 From: Iziram Date: Mon, 11 Mar 2024 11:33:05 +0100 Subject: [PATCH] =?UTF-8?q?Assiduit=C3=A9=20:=20Prompt=20:=20blocage=20scr?= =?UTF-8?q?oll=20+=20fermeture=20on=20success?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/assiduites/widgets/prompt.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/templates/assiduites/widgets/prompt.j2 b/app/templates/assiduites/widgets/prompt.j2 index 0ec99b07b..008e02901 100644 --- a/app/templates/assiduites/widgets/prompt.j2 +++ b/app/templates/assiduites/widgets/prompt.j2 @@ -182,6 +182,9 @@ promptModal.removeEventListener('click', this) } }) + + document.body.style.overflow = "hidden"; + } function promptModalButtonAction(success, cancel) { @@ -189,7 +192,7 @@ succBtn.classList.add("btnPrompt") succBtn.textContent = "Valider" succBtn.addEventListener('click', () => { - const retour = success(); + const retour = success(closePromptModal); if (retour == null || retour == false || retour == undefined) { closePromptModal(); } @@ -207,6 +210,7 @@ function closePromptModal() { promptModal.classList.remove("is-active") + document.body.style.overflow = "auto"; } const promptClose = document.querySelector(".promptModal-close"); promptClose.onclick = function () {