question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox: Autocomplete/Autofill not working

See original GitHub issue

Do you want to request a feature or report a bug? Bug

What is the current behavior? Firefox doesn’t show any autofill suggestions on an input field with type “text” as soon as you connect the state with the attribute “value”

Reproduce https://codesandbox.io/embed/material-demo-y5mlt

  • Open the provided sandbox example
  • Write test in both input fields
  • Press button
  • Write t in both text fields

Important: This works corretly in Chrome but not in Firefox!

What is the expected behavior? Autofill suggestions should be visible in Firefox too!

Autofill is working (FF + Chrome) if value is handled by the browser

  <input
        id="component-simple1"
        autoComplete="on"
        onChange={handleChange}
      />

Autofill is NOT working (FF) if value is handled by React(!)

    <input
        id="component-simple1"
        autoComplete="on"
        onChange={handleChange}
        value={name}
      />

Some pictues which show the wrong behavior It is working as long as React does not handle the value with the state of the component (upper input field): step01

The input field where React handles the value (value={name}) doesn’t show autofill suggestions step02

Version

Tech Version
React latest (see Sandbox)
Browser Firefox 68.0.1(latest)
OS tested on Windows

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:15

github_iconTop GitHub Comments

2reactions
Hadschcommented, Jan 30, 2021

Since this was closed, I opened a new one: https://github.com/facebook/react/issues/18986 Someone has linked this issue to it: https://github.com/facebook/react/issues/15739 There you find another workaround: https://jsfiddle.net/bootleq/hos4r6qd/

Maybe this works for you.

Sadly, Firefox won’t change its behaviour and on the React side, no one reacting 😭

2reactions
Hadschcommented, May 23, 2020

I know… I don’t know why nobody in the react community is reacting to it! For me its a major bug if you destroy the native browser autofill functionallity from the browser!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Form auto fill has stopped working | Firefox Support Forum
page to go to the current Firefox profile folder or use the about:profiles page.
Read more >
3 Ways to Fix the URL Autocomplete if It's Not Working on ...
3 Ways to Fix the URL Autocomplete if It's Not Working on Firefox ; 1. Disable sync. Launch Firefox and click on the...
Read more >
autocomplete = 'off' is not working on firefox - Stack Overflow
It might seem like a good idea to disable auto-fill for login forms in this environment given the added potential for sharing passwords...
Read more >
URL Autocomplete Not Working? : r/firefox - Reddit
Prior to today, when I would enter in the search bar the first one or two letters of a site I visit often,...
Read more >
How to Use Auto Fill in Firefox - Small Business - Chron.com
How to Use Auto Fill in Firefox · 1. Click the "Firefox" button at the top of your browser, scroll to "Options," and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found