From 78681e36dce7a0df72732049d639dd19e99dd485 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 27 Feb 2023 09:35:50 +0100 Subject: [PATCH] Fix unreliable scroll unlock Again, very dirty code, but the deadline is short. Clean this up in the future. --- static/js/nav.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/nav.js b/static/js/nav.js index a9cf33c..a8fb745 100644 --- a/static/js/nav.js +++ b/static/js/nav.js @@ -11,5 +11,8 @@ function toggle_menu() { element_button.addEventListener("click", toggle_menu); for (i = 0; i < nav_items.length; i++) { - nav_items[i].addEventListener("click", toggle_menu); + nav_items[i].addEventListener("click", function() { + toggle_menu(); + document.body.classList.remove("noscroll"); + }); }