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.

[Ionic v4-beta.3] ion-input: autofill / autocomplete not working.

See original GitHub issue

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.1.0 (C:\Users\Tim\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.3
   @angular-devkit/core       : 0.7.3
   @angular-devkit/schematics : 0.7.3
   @angular/cli               : 6.1.3
   @ionic/ng-toolkit          : 1.0.6
   @ionic/schematics-angular  : 1.0.5

System:

   NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.0
   OS     : Windows 10

Describe the Bug autofill/autocomplete not working with ion-input.

Steps to Reproduce

<ion-content padding>
  <input type="text" autocomplete="name"/>
  <form [formGroup]="userForm">
    <ion-list>
      <ion-item>
        <ion-label position="floating">Name</ion-label>
        <ion-input formControlName="name"
                   autofocus
                   autocomplete="name"
                   type="text"></ion-input>
      </ion-item>

Related Code

Expected Behavior autofill/autocomplete to work as html input.

Additional Context

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Nightbrcommented, Nov 9, 2018

Same here, after further investigation seems to be browsers which not handle input in Shadow DOM. Look at this issue: https://github.com/w3c/webcomponents/issues/572

Finally they decided to include Shadow root to look for autocomplete attr look at this: https://github.com/whatwg/html/pull/2149

So we have to options here:

  • Wait a patch in browser to look in Shadow root to find our autocomplete input to autofill them
  • Find a workaround and dev it (I’m looking a workaround if someone has an idea to manipulate the browser autofill API)

Cheers

0reactions
ionitron-bot[bot]commented, Feb 12, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autocomplete and spellcheck options do not work on ionic 3 ...
Hi Alex,. Running into the same problem. Autocomplete and spellcheck options not working for me. <ion-textarea placeholder="Type your ...
Read more >
Ionic 2 ion-input no browser autofill? - Stack Overflow
The fix that I've figured was this: autocomplete="on" and name="email" <ion-input autocomplete="on" name="email" formControlName="email" ...
Read more >
Build better forms in Ionic with autocomplete ... - YouTube
Third, we'll change the input types, this will help our users on ... that the users can auto-fill the data with their browser's...
Read more >
Build better forms in Ionic with autocomplete, helper text, and ...
The first tip is to add helper text to our fields, the first 3 fields are ... and the email field should be...
Read more >
Re: Lastpass is not compatible with ionic 4 - GoTo Community
<ion-input autocomplete="on" v-validate="'required'" ... they have the same problem, LastPass does not recognize the username and password ...
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