Skip to content

A self-hosted dashboard that puts all your feeds in one place

Delay changing popover display

Svilen Markove01af4adec3d
diff --git a/internal/glance/static/js/popover.js b/internal/glance/static/js/popover.js
index 91c69e3..331ee26 100644
--- a/internal/glance/static/js/popover.js
+++ b/internal/glance/static/js/popover.js
@@ -98,7 +98,6 @@ function showPopover() {
}
contentElement.style.maxWidth = contentMaxWidth;
- containerElement.style.display = "block";
activeTarget.classList.add("popover-active");
document.addEventListener("keydown", handleHidePopoverOnEscape);
window.addEventListener("resize", queueRepositionContainer);
@@ -106,6 +105,8 @@ function showPopover() {
}
function repositionContainer() {
+ containerElement.style.display = "block";
+
const targetBounds = activeTarget.dataset.popoverAnchor !== undefined
? activeTarget.querySelector(activeTarget.dataset.popoverAnchor).getBoundingClientRect()
: activeTarget.getBoundingClientRect();