Browse Source

chore: disable browser autocomplete, spellcheck, and password manager interference on input fields

master
mortezaei 6 days ago
parent
commit
2bd91b8915
  1. 3
      src/components/Componentes/question-phone.tsx
  2. 13
      src/components/Componentes/question-text.tsx

3
src/components/Componentes/question-phone.tsx

@ -611,6 +611,9 @@ export function QuestionPhone({
<input <input
type="tel" type="tel"
inputMode="tel" inputMode="tel"
autoComplete="off"
autoCorrect="off"
data-lpignore="true"
disabled={disabled} disabled={disabled}
placeholder={question.extras.placeHolder?.replace(/^\+\d+\s*/, "")} placeholder={question.extras.placeHolder?.replace(/^\+\d+\s*/, "")}
value={phoneValue} value={phoneValue}

13
src/components/Componentes/question-text.tsx

@ -101,6 +101,13 @@ export default function QuestionText({
> >
<input <input
type="text" type="text"
inputMode="email"
autoComplete="off"
autoCorrect="off"
autoCapitalize="none"
spellCheck="false"
data-lpignore="true"
data-form-type="other"
value={localValue} value={localValue}
onChange={(e) => handleChange(e.target.value)} onChange={(e) => handleChange(e.target.value)}
onBlur={handleBlur} onBlur={handleBlur}
@ -140,6 +147,12 @@ export default function QuestionText({
type={isNumericQuestion ? "tel" : "text"} type={isNumericQuestion ? "tel" : "text"}
inputMode={isNumericQuestion ? "numeric" : undefined} inputMode={isNumericQuestion ? "numeric" : undefined}
pattern={isNumericQuestion ? "[0-9]*" : undefined} pattern={isNumericQuestion ? "[0-9]*" : undefined}
autoComplete="off"
autoCorrect="off"
autoCapitalize="none"
spellCheck="false"
data-lpignore="true"
data-form-type="other"
value={localValue} value={localValue}
onChange={(e) => handleChange(e.target.value)} onChange={(e) => handleChange(e.target.value)}
onBlur={handleBlur} onBlur={handleBlur}

Loading…
Cancel
Save