Search code examples
htmlioscontenteditablecapitalization

How do you turn off auto-capitalisation in an editable div on iOS?


I'm aware that for input and textarea tags you can specify autocapitalize as off. Is there a way to do this when you are using a content editable div, as they do not have the autocapitalize attribute?

I have seen similar thinks achieved elsewhere, on the likes of online code editors. The orion editor for example uses an editable div and doesn't suffer this problem.


Solution

  • I have found a workaround to this. I fill the content editable with a zero width space (​) that the user can't see. Then when they tap and start typing, no auto upper casing!