JedWatson / JedWatson/react-select

Chrome autofill behavior

Open
#5,828 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Discussed in https://github.com/JedWatson/react-select/discussions/5757

Originally posted by morozovamv September 22, 2023
Hi! I have a question about how the select behaves when I use a value from the Chrome autofill form.

Imagine I have a form (email/name/country)
image

When I click on the email input, chrome suggests to fill the form
image

I select an option from the chrome menu, it adds all the data. And at that moment the country select is open, which I expected to be closed.
image

Is there an option not to open the select if it was controlled by chrome?

You can find an example here: https://react-ts-ib9kjq.stackblitz.io/
And the code is here: https://stackblitz.com/edit/react-ts-ib9kjq?file=index.tsx

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 by reproducing the behavior in the linked StackBlitz example, using Chrome autofill on the email field and observing the country select. The example code is in index.tsx; done means establishing a reproducible behavior and ensuring the select remains closed after autofill, with the expected behavior confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.