Skip to content

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

Fix popover triangle misalignment

Svilen Markove52374fa2471
diff --git a/internal/glance/static/js/popover.js b/internal/glance/static/js/popover.js
index 98b1051..bada463 100644
--- a/internal/glance/static/js/popover.js
+++ b/internal/glance/static/js/popover.js
@@ -130,7 +130,7 @@ function repositionContainer() {
} else if (left + containerBounds.width > window.innerWidth) {
containerElement.style.removeProperty("left");
containerElement.style.right = 0;
- containerElement.style.setProperty("--triangle-offset", containerBounds.width - containerInlinePadding - (window.innerWidth - targetBounds.left - targetBoundsWidthOffset) + -1 + "px");
+ containerElement.style.setProperty("--triangle-offset", containerBounds.width - containerInlinePadding - (document.documentElement.clientWidth - targetBounds.left - targetBoundsWidthOffset) + -1 + "px");
} else {
containerElement.style.removeProperty("right");
containerElement.style.left = left + "px";