From 7256759488a342fb50f6c53596de914b2b3d9029 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 24 Mar 2023 15:29:46 +0100 Subject: [PATCH] :bug: Fix problem with color picker not able to change hue --- CHANGES.md | 1 + frontend/src/app/main/ui/workspace/colorpicker.cljs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index be95c060f..6bfdb56bf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -55,6 +55,7 @@ - Fix change email and password for users signed in via social login [Taiga #4273](https://tree.taiga.io/project/penpot/issue/4273) - Fix drag and drop files from browser or file explorer under circumstances [Taiga #5054](https://tree.taiga.io/project/penpot/issue/5054) - Fix problem when copy/pasting shapes [Taiga #4931](https://tree.taiga.io/project/penpot/issue/4931) +- Fix problem with color picker not able to change hue [Taiga #5065](https://tree.taiga.io/project/penpot/issue/5065) ### :heart: Community contributions by (Thank you!) - To @ondrejkonec: for contributing to the code with: diff --git a/frontend/src/app/main/ui/workspace/colorpicker.cljs b/frontend/src/app/main/ui/workspace/colorpicker.cljs index 77d54ab03..b99302e36 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker.cljs @@ -67,7 +67,8 @@ (mf/use-fn (mf/deps current-color @drag?) (fn [color] - (when (not= (str/lower (:hex color)) (str/lower (:hex current-color))) + (when (or (not= (str/lower (:hex color)) (str/lower (:hex current-color))) + (not= (:h color) (:h current-color))) (let [recent-color (merge current-color color) recent-color (dc/materialize-color-components recent-color)] (st/emit! (dc/update-colorpicker-color recent-color (not @drag?)))))))