diff --git a/CHANGES.md b/CHANGES.md index caf44f2ff..dae12bee0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,6 +26,7 @@ - Changed the text dominant-baseline to use ideographic [Taiga #4791](https://tree.taiga.io/project/penpot/issue/4791) - Viewer wrong translations [Github #3035](https://github.com/penpot/penpot/issues/3035) - Fix problem with text editor in Safari +- Fix unlink library color when blur color picker input [#3026](https://github.com/penpot/penpot/issues/3026) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/workspace/colorpicker.cljs b/frontend/src/app/main/ui/workspace/colorpicker.cljs index 3f6f3a72b..9f8ee7e73 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker.cljs @@ -65,11 +65,12 @@ handle-change-color (mf/use-fn - (mf/deps @drag?) + (mf/deps current-color @drag?) (fn [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?)))))) + (when (not= (str/lower (:hex color)) (str/lower (:hex 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?))))))) handle-click-picker (mf/use-fn