ionic-team / cordova-plugin-ionic-keyboard

Keyboard Plugin for Cordova
Other
193 stars 178 forks source link

Autocorrect not working #33

Closed JMRMourao closed 5 years ago

JMRMourao commented 6 years ago

From what i read autocorrect is associated to the keyboard dictionary.

But in a ion-textarea the autocorrect='"on" doesnt work. i input the directives and nothing works, but autocomplete works as it should

SlimEmShady commented 5 years ago

Personnally, I got it working on a ion-textarea but not on a ion-searchbar...

<ion-searchbar
          *ngIf="enviesOpened"
          class="mesenvies-searchbar"
          placeholder="Rechercher selon mes envies"
          [(ngModel)]="searchtext"
          [formControl]="searchControl"
          (ionInput)="onSearchInput()"
          autocorrect="on"
  ></ion-searchbar>

I don't know what to do...

JMRMourao commented 5 years ago

What i realised is that there is a problem with focus on the autocorrect. You need to select another element and then select the textarea(also the searchbar in my case) but it was something i didnt managed to fix it at all. Its still to fix for now

SlimEmShady commented 5 years ago

On my app it works great on a textarea without using the focus trick. But if I try to do it on a searchbar, impossible to make autocorrect="on"... And I can't focus another input because my searchbar is the only input on the page. I'll try to add an invisble one and try this solution. Thanks for your help, even a few months later ;)

SlimEmShady commented 5 years ago

Well I find a solution for my <ion-searchbar> ! Just needed to add a type="text" ;)

<ion-searchbar
          *ngIf="enviesOpened"
          class="mesenvies-searchbar"
          placeholder="Rechercher selon mes envies"
          [(ngModel)]="searchtext"
          [formControl]="searchControl"
          (ionInput)="onSearchInput()"
          autocorrect="on"
          type="text"
  ></ion-searchbar>
tobiasmuecksch commented 5 years ago

For me this combination of attributes works: autocomplete="on" autocorrect="on" spellcheck="on"

jcesarmobile commented 5 years ago

I can't reproduce, but if the problem was with ion-textarea, then the bug was probably on ionic itself, not in the plugin. It's probably fixed already as I couldn't reproduce, but if you face it again, please, report it on the ionic repo.