mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 10:27:45 +02:00
Fix popover triangle misalignment
This commit is contained in:
parent
ab093cb232
commit
e52374fa24
@ -130,7 +130,7 @@ function repositionContainer() {
|
|||||||
} else if (left + containerBounds.width > window.innerWidth) {
|
} else if (left + containerBounds.width > window.innerWidth) {
|
||||||
containerElement.style.removeProperty("left");
|
containerElement.style.removeProperty("left");
|
||||||
containerElement.style.right = 0;
|
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 {
|
} else {
|
||||||
containerElement.style.removeProperty("right");
|
containerElement.style.removeProperty("right");
|
||||||
containerElement.style.left = left + "px";
|
containerElement.style.left = left + "px";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user