From 3e0cef4a3cfe0da3a54dfdd72729fe5ca1d44a74 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 10 Mar 2026 07:34:51 +0100 Subject: [PATCH] :bug: Fix embedded editor deselect text shape --- .../src/app/main/ui/workspace/shapes/text/v3_editor.cljs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs index b97c703132..9fd4a23e99 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/v3_editor.cljs @@ -286,7 +286,12 @@ (mf/deps contenteditable-ref) (fn [] (when-let [node (mf/ref-val contenteditable-ref)] - (.focus node)))) + (.focus node)) + ;; Explicitly call on-blur here instead of relying on browser blur events, + ;; because in Firefox blur is not reliably fired when leaving the text editor + ;; by clicking elsewhere. The component does unmount when the shape is + ;; deselected, so we can safely call the blur handler here to finalize the editor. + on-blur)) (mf/use-effect (fn []