0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 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'.
This commit is contained in:
Andrey Antukh 2024-03-06 09:17:39 +01:00
parent 5b722a8608
commit 88f49cfbc9

View file

@ -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)]