diff --git a/frontend/src/components/base/BaseInput.vue b/frontend/src/components/base/BaseInput.vue index 7d8e74d5b..403c86ab4 100644 --- a/frontend/src/components/base/BaseInput.vue +++ b/frontend/src/components/base/BaseInput.vue @@ -52,7 +52,7 @@ const sizeClasses: Record = { } const containerClasses = computed(() => [ - 'relative inline-flex w-full min-w-0 items-center overflow-visible rounded-cp border-0 text-cp-text shadow-cp-input transition-[background-color,box-shadow,color] duration-[160ms] [--base-input-autofill-bg:var(--cp-input-bg)] hover:[--base-input-autofill-bg:var(--cp-input-hover-bg)] focus-within:[--base-input-autofill-bg:var(--cp-input-active-bg)] motion-reduce:transition-none', + 'relative inline-flex w-full min-w-0 items-center overflow-visible rounded-cp border-0 text-cp-text shadow-cp-input transition-[background-color,box-shadow,color] duration-[160ms] motion-reduce:transition-none', sizeClasses[props.size], props.disabled ? 'cursor-not-allowed bg-cp-bg-container-disabled text-cp-text-disabled shadow-none' @@ -73,6 +73,11 @@ const iconClasses = computed(() => [ function updateModel(event: Event) { model.value = (event.target as HTMLInputElement).value } + +function syncAutofill(event: AnimationEvent) { + if (event.animationName === 'base-input-autofill-sync') + updateModel(event) +}