简体   繁体   中英

Jquery autocomplete conflicts with iOs spelling tools

I've got a small problem with the jquery autocomplete tool. When I start typing, the jquery is proposing me some autocomplete options, but iOs spelling tools also, If the visitor is clicking on the autocomplete option, the spelling proposition, is also added to the final value of the input text. here below an example of what I mean. 在此处输入图片说明

Does someone knows how to prevent Ios spelling tool to act when jquery autocomplete is activate ?

Thanks

When you initialize jQuery autocomplete you have to add autocomplete="off" attribute to the inputs you do not want to have native autocomplete.

<input type="text" autocomplete="off" />

For example:

var $someInput = $('.some-input');
$someInput.autocomplete();
$someInput.prop('autocomplete', 'off');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM