From 26f91f0245a1b45c1427f9fc874d3da4d6aba838 Mon Sep 17 00:00:00 2001 From: Kisters-BS <84901454+Kisters-BS@users.noreply.github.com> Date: Fri, 21 Jun 2024 15:39:05 +0200 Subject: [PATCH] Fix aligment of popup menu for svg --- src/app/components/dom/domhandler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/dom/domhandler.ts b/src/app/components/dom/domhandler.ts index 24b232e37ac..bec25545745 100755 --- a/src/app/components/dom/domhandler.ts +++ b/src/app/components/dom/domhandler.ts @@ -126,7 +126,7 @@ export class DomHandler { }; const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element); - const targetHeight = target.offsetHeight; + const targetHeight = target.offsetHeight ?? target.getBoundingClientRect().height; const targetOffset = target.getBoundingClientRect(); const windowScrollTop = this.getWindowScrollTop(); const windowScrollLeft = this.getWindowScrollLeft(); @@ -168,8 +168,8 @@ export class DomHandler { const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element); const elementOuterHeight = elementDimensions.height; const elementOuterWidth = elementDimensions.width; - const targetOuterHeight = target.offsetHeight; - const targetOuterWidth = target.offsetWidth; + const targetOuterHeight = target.offsetHeight ?? target.getBoundingClientRect().height; + const targetOuterWidth = target.offsetWidth ?? target.getBoundingClientRect().width; const targetOffset = target.getBoundingClientRect(); const windowScrollTop = this.getWindowScrollTop(); const windowScrollLeft = this.getWindowScrollLeft();