Skip to content

Native keyboard word suggestions not working in iOS #10852

Closed
@themastersoda

Description

@themastersoda

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.x

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request

Current behavior:
Native keyboard in iOS does not display word suggestions even though ion-input attribute autocomplete is set to true / on. Everything works as expected on Android devices though.

Expected behavior:
Native keyboard should display word suggestions if ion-input attribute autocomplete is set to true / on on both iOS and Android.

Steps to reproduce:
I have created a repository displaying the issue Github repo
I've added several ion-inputs with different combination of attributes to show the issue. Running the app on Android device we can see that keyboard shows suggestions if autocomplete attribute is present, however iOS simply does not care and never displays anything. Tried enabling keyboardAccessoryBar just in case, but that does not help in any way as well.

<ion-list>
    <ion-item>
      <ion-label>No attributes set:</ion-label>
<!-- No text suggestions on any platform, working as expected -->
      <ion-input type="text" [(ngModel)]="text1" name="text1" id="text1"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>autocomplete="true":</ion-label>
<!-- Works on Android, not on iOS -->
      <ion-input autocomplete="true" type="text" [(ngModel)]="text2" name="text2" id="text2"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>autocomplete="on":</ion-label>
<!-- Works on Android, not on iOS -->
      <ion-input autocomplete="on" type="text" [(ngModel)]="text3" name="text3" id="text3"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>autocomplete="on" spellcheck="true":</ion-label>
<!-- Works on Android, not on iOS -->
      <ion-input autocomplete="on" spellcheck="true" type="text" [(ngModel)]="text4" name="text4" id="text4"></ion-input>
    </ion-item>
    <ion-item>
      <ion-label>autocomplete="on":</ion-label>
<!-- Works on Android, not on iOS -->
      <ion-textarea autocomplete="on" spellcheck="true" rows="1" [(ngModel)]="text5" name="text5" id="text5"></ion-textarea>
    </ion-item>
  </ion-list>

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: OS X El Capitan
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions