aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app
diff options
context:
space:
mode:
authorShadowlauch <Shadowlauch@users.noreply.github.com>2021-10-15 01:29:52 +0200
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-10-14 21:31:03 -0400
commitf6c346136297c10389897b183db4f05c07d204fa (patch)
tree81fc948893f9a03d522b722d868bb25325b943da /ext/js/app
parent157d5c9a011e29550b4da375b791c9c48f057bf3 (diff)
fix DOMRect for vertical position calculation (#1986)
Diffstat (limited to 'ext/js/app')
-rw-r--r--ext/js/app/popup.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/app/popup.js b/ext/js/app/popup.js
index 347cbb84..3a29563d 100644
--- a/ext/js/app/popup.js
+++ b/ext/js/app/popup.js
@@ -560,16 +560,16 @@ class Popup extends EventDispatcher {
const verticalOffset = optionsGeneral.popupVerticalOffset2 * offsetScale;
const [x, w] = this._getConstrainedPositionBinary(
- elementRect.left - horizontalOffset,
- elementRect.right + horizontalOffset,
+ elementRect.x - horizontalOffset,
+ elementRect.x + elementRect.width + horizontalOffset,
width,
viewport.left,
viewport.right,
preferRight
);
const [y, h, below] = this._getConstrainedPosition(
- elementRect.bottom - verticalOffset,
- elementRect.top + verticalOffset,
+ elementRect.y + elementRect.height - verticalOffset,
+ elementRect.y + verticalOffset,
height,
viewport.top,
viewport.bottom,