jQuery自动完成插件不关注下一个点击的字段 [英] jQuery autocomplete plugin not focusing the next clicked field

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

问题描述

我正在使用 Jörn Zaefferer 的 jQuery 自动完成插件很好,除了一个小错误:如果用户开始在一个附加了自动完成功能的字段中输入,但是当提示仍然显示他们单击另一个输入字段时,光标会返回到具有自动完成功能的字段.

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.

是否有任何解决方案,或者它几乎是有效的方式?我注意到 jQuery UI 自动完成 做同样的事情.

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.

推荐答案

我已经为你看代码了,取消注释这一行:

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.js583.

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

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