From 44be2b99d2eb5b138e5f7cafa88e1144ee7eca5d Mon Sep 17 00:00:00 2001 From: Harshad Marathe Date: Thu, 12 Dec 2024 16:49:24 +0530 Subject: [PATCH] Fix collapsed menu after reload on state closed --- src/main/resources/static/css/home.css | 1 + src/main/resources/static/js/homecard.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/css/home.css b/src/main/resources/static/css/home.css index 8faa9163..301abe81 100644 --- a/src/main/resources/static/css/home.css +++ b/src/main/resources/static/css/home.css @@ -65,6 +65,7 @@ overflow: hidden; margin: -20px; padding: 20px; + box-sizing:content-box; } .feature-group-container.animated-group { diff --git a/src/main/resources/static/js/homecard.js b/src/main/resources/static/js/homecard.js index 6dddfa2b..9b5297f3 100644 --- a/src/main/resources/static/js/homecard.js +++ b/src/main/resources/static/js/homecard.js @@ -268,7 +268,7 @@ document.addEventListener("DOMContentLoaded", function () { const parent = header.parentNode; const container = header.parentNode.querySelector(".feature-group-container"); if (parent.id !== "groupFavorites") { - container.style.maxHeight = container.clientHeight + "px"; + container.style.maxHeight = container.scrollHeight + "px"; } header.onclick = () => { expandCollapseToggle(parent);