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 <niwi@niwi.nz>
This commit is contained in:
Andrey Antukh 2026-04-22 06:36:31 +00:00 committed by Belén Albeza
parent 7751d9a69b
commit 81faa5a728

View File

@ -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]