Solved menu open too top bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-14 19:33:13 +01:00
parent abdaf54147
commit 066f10edfc

View File

@ -84,7 +84,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (isTopLevel) { if (isTopLevel) {
// Top-Level-Menüs öffnen nur nach oben oder unten // Top-Level-Menüs öffnen nur nach oben oder unten
if (spaceBelow < rect.height && spaceAbove > rect.height) { if (spaceBelow < rect.height && spaceAbove > rect.height) {
submenu.style.bottom = `${window.innerHeight - parentRect.bottom}px`; submenu.style.bottom = `${window.innerHeight - parentRect.bottom - parentRect.height}px`;
submenu.style.top = 'auto'; submenu.style.top = 'auto';
} else { } else {
submenu.style.top = `${parentRect.height}px`; submenu.style.top = `${parentRect.height}px`;