开发者

How can I prevent keyboard autocompletion in MobileSafari/UIWebView?

开发者 https://www.devze.com 2023-03-14 20:46 出处:网络
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 u

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?


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" />
0

精彩评论

暂无评论...
验证码 换一张
取 消