From f56b8be33dd2b5c40e0ec0e5b5f5119b9325956e Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 4 Jan 2023 12:26:24 +0100 Subject: [PATCH] :bug: Fix enter events --- CHANGES.md | 1 + frontend/src/app/main/ui/delete_shared.cljs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 638f8e631..04f39b26f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,7 @@ - Fix missing create component menu for frames [Github #2670](https://github.com/penpot/penpot/issues/2670) - Fix "currentColor" is not converted when importing SVG [Github 2276](https://github.com/penpot/penpot/issues/2276) - Fix incorrect color in properties of multiple bool shapes [Taiga #4355](https://tree.taiga.io/project/penpot/issue/4355) +- Fix pressing the enter key gives you an internal error [Github 2675](https://github.com/penpot/penpot/issues/2675) [Github 2577](https://github.com/penpot/penpot/issues/2577) ### :arrow_up: Deps updates diff --git a/frontend/src/app/main/ui/delete_shared.cljs b/frontend/src/app/main/ui/delete_shared.cljs index 02804ec8c..5aac38206 100644 --- a/frontend/src/app/main/ui/delete_shared.cljs +++ b/frontend/src/app/main/ui/delete_shared.cljs @@ -84,9 +84,10 @@ (dom/stop-propagation event) (st/emit! (modal/hide)) (on-accept props)))] - (->> (events/listen js/document EventType.KEYDOWN on-keydown) - (partial events/unlistenByKey))) - #(st/emit! (dd/clean-temp-shared))) + (let [key (events/listen js/document EventType.KEYDOWN on-keydown)] + (fn [] + (events/unlistenByKey key) + (st/emit! (dd/clean-temp-shared)))))) [:div.modal-overlay [:div.modal-container.confirm-dialog