Skip to content

Commit

Permalink
fix(wallet): prevent autocomplete for text input element
Browse files Browse the repository at this point in the history
  • Loading branch information
onyb committed Mar 25, 2022
1 parent 3b13551 commit 33086b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ const AddAccountModal = (props: Props) => {
onChange={handlePrivateKeyChanged}
type='password'
autoFocus={true}
autoComplete='off'
/>
) : (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function OnboardingRestore (props: Props) {
onChange={handleRecoveryPhraseChanged}
value={recoveryPhrase}
type={showRecoveryPhrase ? 'text' : 'password'}
autoComplete='off'
/>
{hasRestoreError && <ErrorText>{getLocale('braveWalletRestoreError')}</ErrorText>}
{recoveryPhrase.split(' ').length === 24 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ function PasswordInput (props: Props) {
onChange={inputPassword}
onKeyDown={onKeyDown}
autoFocus={autoFocus}
autoComplete='off'
/>
{showToggleButton &&
<ToggleVisibilityButton
showPassword={showPassword}
onClick={onTogglePasswordVisibility}
/>
{showToggleButton &&
<ToggleVisibilityButton
showPassword={showPassword}
onClick={onTogglePasswordVisibility}
/>
}
}
</InputWrapper>
{hasError &&
<ErrorRow>
Expand Down

0 comments on commit 33086b4

Please sign in to comment.