Search code examples
uiwebviewautocompletewebviewautocorrect

Disable & enable auto-correct dynamically in the same html text area


I'm trying to build a twitter like autocomplete and am having trouble disabling autocorrect dynamically.

Essentially what I'm trying to do is have auto-correct="off" when someone hits # and auto-correct="on" when they tap either the space bar or an item on the autocomplete list I provide.

I've attempted to use jquery attr but as one would suspect, to no avail.

@textarea.attr("autocorrect", "on")

Any suggestions for how I could disable autocorrect while someone is using autocomplete?


Solution

  • This isn't much of an answer as it is a mystery but after switching to AngularJS, I no longer needed to disable auto-correct dynamically, somehow something changed and I benefited. Go AngularJS!