自动填充要求您在更新到1.11.0后在iOS中单击两次 [英] Autocomplete requires you to click twice in iOS after update to 1.11.0
问题描述
使用jQuery 2.1.0和jQuery.ui 1.11.0在iOS 7中测试.iPhone和iPad Mini。适用于Android和常规浏览器。
Using jQuery 2.1.0 and jQuery.ui 1.11.0 Tested in iOS 7. iPhone and iPad Mini. Works on android and regular browsers.
我们最近从jQuery UI 1.10.0升级到1.11 .0现在,当点击自动填充结果列表中的项目时,只有鼠标悬停,您必须再次单击相同的元素才能获得点击事件。这曾经适用于版本1.10.0。
We recently upgraded from jQuery UI 1.10.0 to 1.11.0 and now, when clicking an item in an autocomplete results list, you only get a hover, you have to click the same element again to get a click event. This used to work fine with version 1.10.0.
(评论中的JSFiddle链接)
使用css {cursor:pointer}
不起作用
使用 onclick =
不起作用
(评论中的JSFiddle链接)
但这里有趣/怪异部分。它适用于JSFiddle 编辑视图,但不适用于JSFiddle/ show页面。
But here comes the fun/weird part. It works in JSFiddle edit view, but not on the JSFiddle "/show" page.
JSFiddles: (键入一个显示结果的字母s是一个好的)
-
Html视图(不起作用)
编辑视图(有效)
我已经做了好几天了,但是在测试只有html视图之前还没能在JSFiddle中重现它。所以现在我转向你。我不能为我的生活弄清楚为什么一个页面会触发一个click事件,而另一个页面却没有。
I've been working on this for days, but hadn't been able to reproduce it in JSFiddle before testing only the html view. So now I turn to you. I can't for the life of me figure out why the one page triggers a click event, and the other does not.
我正在使用jQuery最基本的功能自动完成。实际上,使用jQuery UI主页上显示的完全相同的代码。
I am using the most basic function of jQuery autocomplete. In fact, using the exact same code that is presented on jQuery UI's home page.
所以,如何在/ show页面上点击一下iOS中的自动完成功能?
So, how do I get autocomplete to work with one click in iOS on the /show page?
(我会在评论中发布其他链接,因为我不会还有10个代表。除非我没有足够的代表评论...)
推荐答案
只是一个稍后,但是
$("#input").autocomplete({
open: function(event, ui) {
$('.ui-autocomplete').off('menufocus hover mouseover mouseenter');
}
});
这篇关于自动填充要求您在更新到1.11.0后在iOS中单击两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!