From dc6b476c5745217c4d4c4094f6d3ca0be9605eb9 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 27 Oct 2020 12:17:41 +0100 Subject: [PATCH] :bug: Fixes problem when editing projects in dashboard. --- frontend/src/app/main/ui/dashboard/inline_edition.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/dashboard/inline_edition.cljs b/frontend/src/app/main/ui/dashboard/inline_edition.cljs index e376ebcd6..6439414a8 100644 --- a/frontend/src/app/main/ui/dashboard/inline_edition.cljs +++ b/frontend/src/app/main/ui/dashboard/inline_edition.cljs @@ -38,6 +38,12 @@ (dom/prevent-default event) (dom/stop-propagation event))) + on-blur + (mf/use-callback + (fn [event] + (let [name (dom/get-target-val event)] + (on-end name)))) + on-keyup (mf/use-callback (fn [event] @@ -60,7 +66,8 @@ :ref input-ref :on-click on-click :on-change on-input - :on-key-down on-keyup}] + :on-key-down on-keyup + :on-blur on-blur}] [:span.close {:on-click on-cancel} i/close]]))