From 81faa5a7281aea05004743694e43ab49ae4f2314 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 22 Apr 2026 06:36:31 +0000 Subject: [PATCH] :zap: Replace duplicate on-blur lambda with stable on-text-blur ref The inline (fn [] (ts/schedule ...)) passed as :on-blur to text-options was an exact copy of the on-text-blur callback already defined via mf/use-fn earlier in the same let block. Pass on-text-blur directly to avoid allocating a new function object on every render. Signed-off-by: Andrey Antukh --- .../app/main/ui/workspace/sidebar/options/menus/text.cljs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index 22f79291d5..c1d9424574 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -500,13 +500,7 @@ :values values :on-change on-change :show-recent true - :on-blur - (fn [] - (ts/schedule - 100 - (fn [] - (when (not= "INPUT" (-> (dom/get-active) dom/get-tag-name)) - (dom/focus! (txu/get-text-editor-content))))))}]) + :on-blur on-text-blur}]) [:div {:class (stl/css :text-align-options)} [:> text-align-options* common-props]