Auto capitalize input fields?

‘Auto-Capitalization’ can be enabled in the settings of the OS (E.g. iOS: General > Keyboard → Auto-Capitalization). Why does this setting not affect the input fields in my Ionic app? Or is there a way to enable this behaviour? I’ve noticed the ‘autocapitalize’ attribute in the documentation of ion-input (Ionic v5.x). However, I’d like to use the global setting instead of declaring this attribute for each input in my application.

Thanks for any help!

May I know the reason why you want to put this globally? If the reason is not that important, I think adding the autocapitalize in every ion-input is fine.

Yes, you are right. I added the attribute to each ion-input and it works perfectly. And if the user does not like this behaviour, he can even deactivate autocapitalize in the settings of the operating system.

I was just curious why the global setting had impact to other Ionic components, e.g. ion-searchbar, without declaring an extra attribute. But I’m happy with the current solution. Thanks for your reply!

1 Like