How can I prevent keyboard autocompletion in MobileSafari/UIWebView?

拈花ヽ惹草 提交于 2019-12-06 22:27:03

问题


I'm implementing my own autocompletion on an <input> field inside a UIWebView, and the built-in keyboard autocompletion interferes with the user experience. Is there a way to use HTML or Javascript to signal to iOS that it shouldn't try to autocomplete?


回答1:


In my comments I mentioned using the html attribute autocomplete but I tested it, and it doesn't address your issue. However, there is an attribute specific to Mobile Safari which may help. You could try turning off autocorrect like so:

<input type="text" id="your-field" autocorrect="off" />


来源:https://stackoverflow.com/questions/6461101/how-can-i-prevent-keyboard-autocompletion-in-mobilesafari-uiwebview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!