From 5a98e05f88edd48231e0aa4293de78afd488c99d Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:27:11 -0300 Subject: [PATCH] feat: forms better compatibility with chrome autofill --- front/share/src/Form/Input.svelte | 15 ++++++++++++--- front/share/src/Form/Label.svelte | 3 +++ front/share/src/Form/forms.module.css | 14 +++++++++++++- front/share/src/LoginDashboard/login-page.css | 1 + 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/front/share/src/Form/Input.svelte b/front/share/src/Form/Input.svelte index 6751b99d..84b559cf 100644 --- a/front/share/src/Form/Input.svelte +++ b/front/share/src/Form/Input.svelte @@ -23,6 +23,8 @@ export let on_change: ((v: string) => void) | null = null; + import css from "./forms.module.css"; + $: empty = display_value === ""; $: text_lines = display_value.split("\n").length; @@ -49,11 +51,18 @@ on_change?.(h); } - import css from "./forms.module.css"; + const mount = (el: HTMLInputElement | HTMLTextAreaElement) => { + setTimeout(() => { + if(el.value !== "") { + on_input(el.value); + } + }, 500) + } + {#if multiline} -