不着眼于下一个被点击的jQuery场插件自动完成 [英] jQuery autocomplete plugin not focusing the next clicked field

查看:99
本文介绍了不着眼于下一个被点击的jQuery场插件自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是乔恩Zaefferer的jQuery的自动完成插件伟大的工程,除了一个小bug:如果一个用户开始在自动完成连接到某个字段中键入,但然后同时建议仍呈现他们点击另一个输入字段时,光标返回到与自动完成字段

I'm using the Jörn Zaefferer's jQuery autocomplete plugin which works great, except for a small bug: if a user begins typing in one field where the autocomplete is attached to, but then while the suggest is still showing they click on another input field, the cursor returns back to the field with the autocomplete.

是否有这个解决方案的任何,或者是它更pretty作品的方式?我注意到,jQuery用户界面自动完成做同样的事情

Are there any solutions to this, or is it pretty much the way works? I noticed that the jQuery UI autocomplete does the same thing.

推荐答案

我去过还跟看code你,取消这一行:

I've been kind enough to look at the code for you, uncomment this line:

// TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
input.focus();

jquery.autocomplete.js 583

这篇关于不着眼于下一个被点击的jQuery场插件自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆