From 46ce9500fc315b15759c648047c53b0b654608e1 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Mon, 9 Jun 2025 09:52:35 +0200 Subject: [PATCH] :bug: Fix absolute position tooltip message (#6660) --- .../src/app/main/ui/ds/tooltip/tooltip.cljs | 2 +- .../ui/workspace/tokens/theme_select.cljs | 43 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs index 23d1655f2c..c69c2609e5 100644 --- a/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs +++ b/frontend/src/app/main/ui/ds/tooltip/tooltip.cljs @@ -148,7 +148,7 @@ (ts/dispose! schedule) (mf/set-ref-val! schedule-ref nil)) (when-let [tooltip (dom/get-element id)] - (let [trigger-rect (->> (dom/get-current-target event) + (let [trigger-rect (->> (dom/get-target event) (dom/get-bounding-rect))] (mf/set-ref-val! schedule-ref diff --git a/frontend/src/app/main/ui/workspace/tokens/theme_select.cljs b/frontend/src/app/main/ui/workspace/tokens/theme_select.cljs index f67f7534fe..bf6120ec52 100644 --- a/frontend/src/app/main/ui/workspace/tokens/theme_select.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/theme_select.cljs @@ -49,28 +49,27 @@ (mf/defc theme-options [{:keys [active-theme-paths themes on-close]}] - (let [] - (let [on-edit-click #(modal/show! :tokens/themes {})] - [:ul {:class (stl/css :theme-options :custom-select-dropdown) - :role "listbox"} - (for [[group themes] themes] - [:li {:key group - :aria-labelledby (dm/str group "-label") - :role "group"} - (when (seq group) - [:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group]) - [:& themes-list {:themes themes - :active-theme-paths active-theme-paths - :on-close on-close - :grouped? true}]]) - [:li {:class (stl/css :separator) - :aria-hidden true}] - [:li {:class (stl/css-case :checked-element true - :checked-element-button true) - :role "option" - :on-click on-edit-click} - [:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")] - [:> icon* {:icon-id i/arrow-right :aria-hidden true}]]]))) + (let [on-edit-click #(modal/show! :tokens/themes {})] + [:ul {:class (stl/css :theme-options :custom-select-dropdown) + :role "listbox"} + (for [[group themes] themes] + [:li {:key group + :aria-labelledby (dm/str group "-label") + :role "group"} + (when (seq group) + [:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group]) + [:& themes-list {:themes themes + :active-theme-paths active-theme-paths + :on-close on-close + :grouped? true}]]) + [:li {:class (stl/css :separator) + :aria-hidden true}] + [:li {:class (stl/css-case :checked-element true + :checked-element-button true) + :role "option" + :on-click on-edit-click} + [:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")] + [:> icon* {:icon-id i/arrow-right :aria-hidden true}]]])) (mf/defc theme-select [{:keys []}]