From a2231a8bf9a1f0aca5c1295142d0b0ab6e347879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Torr=C3=B3?= Date: Fri, 31 Jul 2026 11:48:31 +0200 Subject: [PATCH] :bug: Fix text align shown as left in v3 editor (#10973) --- frontend/src/app/main/data/workspace/texts_v3.cljs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/texts_v3.cljs b/frontend/src/app/main/data/workspace/texts_v3.cljs index 7bda952571..c0b27abe95 100644 --- a/frontend/src/app/main/data/workspace/texts_v3.cljs +++ b/frontend/src/app/main/data/workspace/texts_v3.cljs @@ -15,8 +15,11 @@ (ptk/reify ::v3-update-text-editor-styles ptk/UpdateEvent (update [_ state] - (let [merged-styles (merge (txt/get-default-text-attrs) - (fonts/valid-default-font - (get-in state [:workspace-global :default-font])) - new-styles)] - (update-in state [:workspace-wasm-editor-styles id] (fnil merge {}) merged-styles))))) + (if (not= id (get-in state [:workspace-local :edition])) + state + (let [defaults (merge (txt/get-default-text-attrs) + (fonts/valid-default-font + (get-in state [:workspace-global :default-font])))] + (update-in state [:workspace-wasm-editor-styles id] + (fn [current-styles] + (merge defaults current-styles new-styles))))))))