From dad88cb42e3c1d442f369a4a6b8e168dffc37a29 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Mon, 13 Mar 2023 15:23:55 +0100 Subject: [PATCH] :bug: Fix close colorpicker on Firefox when mouse-up is outside the picker --- CHANGES.md | 1 + frontend/src/app/main/ui/modal.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index a45658970..de9102c89 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -27,6 +27,7 @@ - Fix unlink library color when blur color picker input [#3026](https://github.com/penpot/penpot/issues/3026) - Fix snap pixel when moving path points on high zoom [#2930](https://github.com/penpot/penpot/issues/2930) - Fix shortcuts for zoom now take into account the mouse position [#2924](https://github.com/penpot/penpot/issues/2924) +- Fix close colorpicker on Firefox when mouse-up is outside the picker [#2911](https://github.com/penpot/penpot/issues/2911) ### :heart: Community contributions by (Thank you!) - To @ondrejkonec: for contributing to the code with: diff --git a/frontend/src/app/main/ui/modal.cljs b/frontend/src/app/main/ui/modal.cljs index 47cca1645..aa1b752a9 100644 --- a/frontend/src/app/main/ui/modal.cljs +++ b/frontend/src/app/main/ui/modal.cljs @@ -66,7 +66,7 @@ (events/listen js/document EventType.KEYDOWN handle-keydown) ;; Changing to js/document breaks the color picker - (events/listen (dom/get-root) EventType.CLICK handle-click-outside) + (events/listen (dom/get-root) EventType.MOUSEDOWN handle-click-outside) (events/listen js/document EventType.CONTEXTMENU handle-click-outside)]] #(doseq [key keys]