From 659d166d1cee2eb8104508da2056e2ae86c8f9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Thu, 17 Oct 2024 00:26:33 +0200 Subject: [PATCH] Use input event to watch form fields THe keyup event might not fire is focus change to rapidly. --- vendor/brr_lwd_ui/lib/forms/field.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/brr_lwd_ui/lib/forms/field.ml b/vendor/brr_lwd_ui/lib/forms/field.ml index 0236948..48eed6b 100644 --- a/vendor/brr_lwd_ui/lib/forms/field.ml +++ b/vendor/brr_lwd_ui/lib/forms/field.ml @@ -67,13 +67,13 @@ let text_input ?validate ?d ?(at = []) ?ev ?required ?pattern ?placeholder in let value = Jv.to_string in make_input ~value ?validate ?d ~at ?ev ?required ?pattern - ~value_change_event:Ev.keyup ~type':"text" default_value + ~value_change_event:Ev.input ~type':"text" default_value let password_input ?validate ?d ?(at = []) ?ev ?required ?pattern ?placeholder _value = let at = at |> A.add_opt At.Name.placeholder placeholder in let value = Jv.to_string in - make_input ~value ~value_change_event:Ev.keyup ?validate ?d ~at ?ev ?required + make_input ~value ~value_change_event:Ev.input ?validate ?d ~at ?ev ?required ?pattern ~type':"password" None let submit ?d ?(at = []) ?ev text =