From 5336bbbe65ec383c42b4b83c0f26cd4d0281579e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 11 Feb 2021 11:23:48 +0100 Subject: [PATCH] :bug: Fixes problem change color to texts from the palette --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/shapes/text/editor.cljs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index d94ed54fd..3eef0a134 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,6 +23,7 @@ - Fix unexpected exception when uploading image - Fix 404 when acces shared link [#615](https://github.com/penpot/penpot/issues/615) - Fix show correct error when google auth is disabled +- Fix apply a color to a text selection from color palette was not working ### Community contributions by (Thank you! :heart:) diff --git a/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs b/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs index 68a143cfb..d279c16fa 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/editor.cljs @@ -173,13 +173,15 @@ options (dom/get-element-by-class "element-options") assets (dom/get-element-by-class "assets-bar") cpicker (dom/get-element-by-class "colorpicker-tooltip") + palette (dom/get-element-by-class "color-palette") self (mf/ref-val self-ref) selecting? (mf/ref-val selecting-ref)] (when-not (or (and options (.contains options target)) (and assets (.contains assets target)) (and self (.contains self target)) - (and cpicker (.contains cpicker target))) + (and cpicker (.contains cpicker target)) + (and palette (.contains palette target))) (do (if selecting?