From b71b5d4ba994f00cdc84bec8147e40940db5a519 Mon Sep 17 00:00:00 2001 From: Baraa Al-Masri Date: Mon, 1 Jul 2024 03:21:27 +0300 Subject: [PATCH] fix(popover-up): close for different screen sizes --- app/static/js/utils.js | 2 +- app/views/components/menus/popover_up.templ | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/static/js/utils.js b/app/static/js/utils.js index ce384e7..a987ab2 100644 --- a/app/static/js/utils.js +++ b/app/static/js/utils.js @@ -116,7 +116,7 @@ function menuer() { e.clientX < rect.left || e.clientX > rect.right || e.clientY + parentRect.height + 5 < rect.top || - e.clientY > rect.bottom + e.clientY > rect.bottom + parentRect.height + 5 ) { lastEl.style.display = "none"; lastEl = null; diff --git a/app/views/components/menus/popover_up.templ b/app/views/components/menus/popover_up.templ index fc06b92..7c98125 100644 --- a/app/views/components/menus/popover_up.templ +++ b/app/views/components/menus/popover_up.templ @@ -35,6 +35,7 @@ css top(topVal string) { script toggleTheThingUp(id string) { id = `popover-${id}`; + Utils.registerPopover(id); const popover = document.getElementById(id); if (popover.style.display !== "block") { popover.style.display = "block";