FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

feat(input): add autocapitalize as an input attribute on ion-input #168

Open marcialwushu opened 5 years ago

marcialwushu commented 5 years ago

<ion-item>
    <ion-label>Ionic: default</ion-label>
    <ion-input placeholder="no autocapitalize"></ion-input>
  </ion-item>

  <ion-item>
    <ion-label>Ionic: none</ion-label>
    <ion-input autocapitalize="none" placeholder="none"></ion-input>
  </ion-item>

  <ion-item>
    <ion-label>Ionic: on</ion-label>
    <ion-input autocapitalize="on" placeholder="on"></ion-input>
  </ion-item>

  <ion-item>
    <ion-label>Ionic: sentences</ion-label>
    <ion-input autocapitalize="sentences" placeholder="sentences"></ion-input>
  </ion-item>

  <ion-item>
    <ion-label>Native: default</ion-label>
    <input ngProjectAs="ion-input" placeholder="no autocapitalize"/>
  </ion-item>

  <ion-item>
    <ion-label>Native: none</ion-label>
    <input ngProjectAs="ion-input" autocapitalize="none" placeholder="none"/>
  </ion-item>

  <ion-item>
    <ion-label>Native: on</ion-label>
    <input ngProjectAs="ion-input" autocapitalize="on" placeholder="on"/>
  </ion-item>

  <ion-item>
    <ion-label>Native: sentences</ion-label>
    <input ngProjectAs="ion-input" autocapitalize="sentences" placeholder="sentences"/>
  </ion-item>

marcialwushu commented 5 years ago

Both the ion-input and the native input elements behave exactly the same, and I am able to see autocapitalize being passed down to the native input. Could you provide a plunker or steps to reproduce this? Thanks :)

marcialwushu commented 5 years ago

https://github.com/ionic-team/ionic/issues/12614

marcialwushu commented 5 years ago

Hmm tried the autocapitalize="none" but still didn’t pick it up. My current workaround is to use type=“url” (for all my fields)