diff --git a/frontend/src/app/main/ui/workspace/colorpalette.cljs b/frontend/src/app/main/ui/workspace/colorpalette.cljs index 39b0e17bb..6ebb2bd65 100644 --- a/frontend/src/app/main/ui/workspace/colorpalette.cljs +++ b/frontend/src/app/main/ui/workspace/colorpalette.cljs @@ -36,7 +36,9 @@ (mf/defc palette [{:keys [current-colors recent-colors file-colors shared-libs selected on-select]}] - (let [state (mf/use-state {:show-menu false}) + (let [;; We had to do this due to a bug that leave some bugged colors + current-colors (filter #(some? (:color %)) current-colors) + state (mf/use-state {:show-menu false}) width (:width @state 0) visible (/ width 66) diff --git a/frontend/src/app/main/ui/workspace/colorpicker/harmony.cljs b/frontend/src/app/main/ui/workspace/colorpicker/harmony.cljs index b73e85843..3c6323a5b 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/harmony.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/harmony.cljs @@ -131,6 +131,7 @@ :width canvas-side :height canvas-side :on-pointer-down handle-start-drag + :on-pointer-up handle-stop-drag :on-lost-pointer-capture handle-stop-drag :on-click calculate-pos :on-mouse-move #(when @dragging? (calculate-pos %))}] diff --git a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs index 09a8cfa41..7684b0079 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/ramp.cljs @@ -41,6 +41,7 @@ ] [:div.value-saturation-selector {:on-pointer-down handle-start-drag + :on-pointer-up handle-stop-drag :on-lost-pointer-capture handle-stop-drag :on-click calculate-pos :on-mouse-move #(when @dragging? (calculate-pos %))} diff --git a/frontend/src/app/main/ui/workspace/colorpicker/slider_selector.cljs b/frontend/src/app/main/ui/workspace/colorpicker/slider_selector.cljs index 9c47681d2..e6dafa65f 100644 --- a/frontend/src/app/main/ui/workspace/colorpicker/slider_selector.cljs +++ b/frontend/src/app/main/ui/workspace/colorpicker/slider_selector.cljs @@ -52,6 +52,7 @@ [:div.slider-selector {:class (str (if vertical? "vertical " "") class) :on-pointer-down handle-start-drag + :on-pointer-up handle-stop-drag :on-lost-pointer-capture handle-stop-drag :on-click calculate-pos :on-mouse-move #(when @dragging? (calculate-pos %))}