diff --git a/CHANGES.md b/CHANGES.md index c6ef612cb..b0bf82c88 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,6 +42,7 @@ ### :bug: Bugs fixed +- On dashboard enter on empty search refresh the page [Taiga #2597](https://tree.taiga.io/project/penpot/issue/2597) - Pencil cursor changes when activated [Taiga #2276](https://tree.taiga.io/project/penpot/issue/2276) - Fix icon placement in Mixed message [Taiga #3037](https://tree.taiga.io/project/penpot/issue/3037) - Fix scroll in comment section [Taiga #3068](https://tree.taiga.io/project/penpot/issue/3068) diff --git a/frontend/src/app/main/ui/auth.cljs b/frontend/src/app/main/ui/auth.cljs index a3e55fad9..c40af3605 100644 --- a/frontend/src/app/main/ui/auth.cljs +++ b/frontend/src/app/main/ui/auth.cljs @@ -28,7 +28,7 @@ [:a {:href cf/terms-of-service-uri :target "_blank"} (tr "auth.terms-of-service")]) (when show-all? - [:span (tr "auth.and")]) + [:span (tr "labels.and")]) (when show-privacy? [:a {:href cf/privacy-policy-uri :target "_blank"} (tr "auth.privacy-policy")])]))) diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index 6ab4627ab..39c929ff1 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -26,6 +26,7 @@ [app.util.dom :as dom] [app.util.dom.dnd :as dnd] [app.util.i18n :as i18n :refer [tr]] + [app.util.keyboard :as kbd] [app.util.object :as obj] [app.util.router :as rt] [beicon.core :as rx] @@ -169,7 +170,14 @@ (let [search-input (dom/get-element "search-input")] (dom/clean-value! search-input) (dom/focus! search-input) - (emit! (dd/go-to-search)))))] + (emit! (dd/go-to-search))))) + + on-key-press + (mf/use-callback + (fn [e] + (when (kbd/enter? e) + (dom/prevent-default e) + (dom/stop-propagation e))))] [:form.sidebar-search [:input.input-text @@ -182,6 +190,7 @@ :on-focus on-search-focus :on-blur on-search-blur :on-change on-search-change + :on-key-press on-key-press :ref #(when % (set! (.-value %) search-term))}] (if (or @focused? (seq search-term)) diff --git a/frontend/translations/en.po b/frontend/translations/en.po index ab4f85169..9ad21b2c0 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -117,9 +117,6 @@ msgstr "Password" msgid "auth.password-length-hint" msgstr "At least 8 characters" -msgid "auth.and" -msgstr "and" - msgid "auth.privacy-policy" msgstr "Privacy policy" @@ -1022,6 +1019,9 @@ msgstr "Admin" msgid "labels.all" msgstr "All" +msgid "labels.and" +msgstr "and" + #: src/app/main/ui/static.cljs msgid "labels.bad-gateway.desc-message" msgstr "" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 2ccfefcfe..ccc402c43 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -121,9 +121,6 @@ msgstr "Contraseña" msgid "auth.password-length-hint" msgstr "8 caracteres como mínimo" -msgid "auth.and" -msgstr "y" - msgid "auth.privacy-policy" msgstr "Política de privacidad" @@ -1023,6 +1020,9 @@ msgstr "Administración" msgid "labels.all" msgstr "Todo" +msgid "labels.and" +msgstr "y" + #: src/app/main/ui/static.cljs msgid "labels.bad-gateway.desc-message" msgstr ""