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.

bug: ion-input autofill does not work when input is nested within other Ionic components

See original GitHub issue

Bug Report

Ionic Version:

[x] 4.x

Current behavior:

When attempting to use the username/password autofill prompt provided by the operating system (like iOS with Keychain or 1Password), if an ion-input element is nested within another Ionic component (like ion-item or ion-row), the autofill capability will not be provided to the user.

Expected behavior:

<ion-input> components should allow for autofilling regardless of whether or not they are nested (within reason) in other Ionic components.

Related code:

Repo: https://github.com/bryplano/UsernameRepro

Steps to reproduce:

See README.md on the included sample repository.

Short version:

  1. Create an application that places two ion-input components - one for a username and one for a password - onto a single page app.
  2. Run the app on an iOS device
  3. Try to autofill the fields using a username/password autofill capability or app (iOS Keychain, 1Password, LastPass, etc.) by tapping on the username field and attempting to autofill via the keyboard shortcut
  4. The Issue: Notice that if the ion-input components are nested as part of an ion-grid or an ion-list in some manner, the ion-input for username will not allow the user to autofill a value. Only the ion-input for password will autofill properly.

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 5.2.8 
   Ionic Framework               : @ionic/angular 4.9.1
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Capacitor:

   Capacitor CLI   : 1.2.1
   @capacitor/core : 1.2.1

Utility:

   cordova-res : 0.6.0 
   native-run  : 0.2.8 

System:

   NodeJS : v10.16.3
   npm    : 6.9.0
   OS     : macOS Mojave

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
cmaascommented, Nov 27, 2019

@bryplano I also opened an issue at the capacitor repo the other day, because I thought it was related to it. I think it can be closed too: https://github.com/ionic-team/capacitor/issues/2211 (And I think it helps to have as few open issues as possible for trust reasons 😉)

1reaction
cmaascommented, Nov 27, 2019

@bryplano Good find, thanks for pointing this out. In the meantime, I just redesign my login form to use ion-card as suggested above. This works pretty well. I guess this issue can be closed then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: ion-input autofill does not work when input is nested ...
<ion-input> components should allow for autofilling regardless of whether or not they are nested (within reason) in other Ionic components.
Read more >
html - input / ion-input in reactive forms - problems with ...
I posted one in the link.Do an exhaustive search on this site. Apparently it is a common error. My Solution was based on...
Read more >
ion-input: Custom Input Value Type Styling and CSS Properties
ion-input is a wrapper to the HTML input element, with custom value type styling and functionality. It works on desktops and integrates with...
Read more >
ng0303: can't bind to 'mattreenodedefof' since it isn't a known ...
NG0303: Can't bind to 'ngModel' since it isn't a known property of 'ion-input'. I try to import FormsModule on my module but still...
Read more >
How Immutable Data Can Make Your Ionic Apps Faster
In this tutorial, we will discuss how to use immutable data and the OnPush strategy to reduce the load of change detection in...
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