From df083cb3159c09ea2032f491999ece455433991b Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Tue, 26 Aug 2025 16:55:26 +0200 Subject: [PATCH] :bug: Fix corner case on tooltip positioning --- frontend/src/app/main/ui/ds/tooltip/tooltip.cljs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs index 39995ab816..ac89d1fe24 100644 --- a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs +++ b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs @@ -160,11 +160,7 @@ tooltip-brect (assoc tooltip-brect :height (or saved-height (:height tooltip-brect)) :width (or saved-width (:width tooltip-brect))) window-size (dom/get-window-size)] (when-let [[placement placement-rect] (find-matching-placement placement tooltip-brect origin-brect window-size offset)] - (let [height (if (or (= placement "right") (= placement "left")) - (- (:height placement-rect) arrow-height) - (:height placement-rect))] - (dom/set-data! tooltip "height" (:height tooltip-brect)) - (dom/set-data! tooltip "width" (:width tooltip-brect)) + (let [height (:height placement-rect)] (dom/set-css-property! tooltip "block-size" (dm/str height "px")) (dom/set-css-property! tooltip "inset-block-start" (dm/str (:top placement-rect) "px")) (dom/set-css-property! tooltip "inset-inline-start" (dm/str (:left placement-rect) "px"))) @@ -253,7 +249,7 @@ :on-focus on-show :on-blur on-hide :on-key-down handle-key-down - :class (stl/css :tooltip-trigger) + :class [class (stl/css :tooltip-trigger)] :aria-describedby id}) content (if (fn? content) @@ -262,7 +258,7 @@ [:> :div props children - [:div {:class [class (stl/css :tooltip)] + [:div {:class (stl/css :tooltip) :id id :popover "auto" :role "tooltip"}