From 1c592e19d4828051752f95e71ef1509eb322d9f5 Mon Sep 17 00:00:00 2001 From: mortezaei Date: Tue, 18 Aug 2026 15:29:26 +0330 Subject: [PATCH] fix input autofill code --- src/components/Componentes/question-phone.tsx | 2 + src/components/Componentes/question-text.tsx | 56 ++++++++++--------- .../Componentes/question-textarea.tsx | 22 ++++---- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/src/components/Componentes/question-phone.tsx b/src/components/Componentes/question-phone.tsx index 2eab460..b255242 100644 --- a/src/components/Componentes/question-phone.tsx +++ b/src/components/Componentes/question-phone.tsx @@ -567,6 +567,7 @@ export function QuestionPhone({ ].join(" ")} > +
e.preventDefault()}>
+
{showInvalidState ? ( Enter a valid phone number with country code. diff --git a/src/components/Componentes/question-text.tsx b/src/components/Componentes/question-text.tsx index 7463527..1b0f2f9 100644 --- a/src/components/Componentes/question-text.tsx +++ b/src/components/Componentes/question-text.tsx @@ -92,18 +92,20 @@ export default function QuestionText({ )} > - handleChange(e.target.value)} - onBlur={handleBlur} - placeholder={question.extras.placeHolder} - disabled={disabled || isMuted} - /> +
e.preventDefault()}> + handleChange(e.target.value)} + onBlur={handleBlur} + placeholder={question.extras.placeHolder} + disabled={disabled || isMuted} + /> +
{showInvalidState ? ( {question.validation?.errorMessage || @@ -131,20 +133,22 @@ export default function QuestionText({ )} > - handleChange(e.target.value)} - onBlur={handleBlur} - placeholder={question.extras.placeHolder} - disabled={disabled || isMuted} - className={cn( - isMuted && "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]", - )} - /> +
e.preventDefault()}> + handleChange(e.target.value)} + onBlur={handleBlur} + placeholder={question.extras.placeHolder} + disabled={disabled || isMuted} + className={cn( + isMuted && "opacity-50 cursor-not-allowed bg-[#F5F5F5] border-[#E2E8F0]", + )} + /> +
{isMarjaQuestion ? (