JedWatson / JedWatson/react-select

Disable Chrome autofill allowing autoComplete="new-password" to be passed into the Input component properties

Open
#3,500 16 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/needs-review issue/reviewed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Currently, the default Input component is forcefully setting autoComplete="off" which doesn't disable Chrome's autofill functionality on latest browser versions. For achieving that, we need to pass autoComplete="new-password".

The problem is that the value is hardcoded and can't be configured unless we implement our own Input component and configure this property properly there.

It's hardcoded here: https://github.com/JedWatson/react-select/blob/ba76246a92fe9371b5d4f8795d30119b045dcaba/src/Select.js#L1401

And it gets passed to the default Input component here: https://github.com/JedWatson/react-select/blob/ba76246a92fe9371b5d4f8795d30119b045dcaba/src/components/Input.js#L53

As you can see, there's no way of configuring that property manually.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Select.js around line 1401 and src/components/Input.js around line 53 to trace how the hardcoded autoComplete value reaches the default Input component. Check the existing component-property flow and confirm that the requested value can be configured; done means consumers can pass autoComplete="new-password" without implementing a replacement Input component.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.