From 88f49cfbc932272c5bf7e9cd789a5d1ba1f462d3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 6 Mar 2024 09:17:39 +0100 Subject: [PATCH] :bug: Fix email field intrusive autocomplete on firefox Firefox has a strange behavior because it ignores the autocomplete attribute and just does not allow submit a form when an email type field has invalid email (valid but surrounded with whitespace). This fix is a workaround, setting up the input field as simple text instead of semantic type 'email'. --- frontend/src/app/main/ui/auth/register.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/auth/register.cljs b/frontend/src/app/main/ui/auth/register.cljs index 0c1a0e70c..6789b99dc 100644 --- a/frontend/src/app/main/ui/auth/register.cljs +++ b/frontend/src/app/main/ui/auth/register.cljs @@ -100,7 +100,7 @@ (on-success-callback p))) on-submit - (mf/use-callback + (mf/use-fn (fn [form _event] (reset! submitted? true) (let [cdata (:clean-data @form)] @@ -114,7 +114,7 @@ [:& fm/form {:on-submit on-submit :form form} [:div {:class (stl/css :fields-row)} - [:& fm/input {:type "email" + [:& fm/input {:type "text" :name :email :label (tr "auth.email") :data-test "email-input" @@ -225,7 +225,7 @@ (on-success-callback (:email p)))) on-submit - (mf/use-callback + (mf/use-fn (fn [form _event] (reset! submitted? true) (let [params (:clean-data @form)]