jQuery ui组合框在IE 10中默认打开 [英] jQuery ui combo-box opens on default in IE 10

查看:73
本文介绍了jQuery ui组合框在IE 10中默认打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery UI Autocomplete在我的UI中显示组合框.我引用了以下网址 http://jqueryui.com/autocomplete/#combobox 来渲染comboBoxes.对于我的ID为"myComboBox"的下拉菜单,我使用以下命令将组合框设置为在页面加载时集中显示.

I am using jQuery UI Autocomplete to display combo boxes in my UI. I referred the following url http://jqueryui.com/autocomplete/#combobox for rendering comboBoxes.For my drop down having ID say "myComboBox", I have set the combo-box to focus when the page loads using the following.

$('#myComboBox').next().find('input').focus();

这在chrome和IE 9中工作正常,但是在IE 10中,默认情况下,在任何用户选择之前都会打开组合框. IE 10版中是否存在针对此特定错误的任何解决方法

This works fine in chrome and IE 9,however in IE 10 the combo boxes open by default prior to any user selection. Is there any workaround for this particular bug in IE version 10

推荐答案

根据 https://stackoverflow.com/a/28143320 /2065039 的答案,您需要尝试在autocomplete上添加focus,然后像

According to https://stackoverflow.com/a/28143320/2065039 answer you need to try adding a focus to your autocomplete and then blur it something like

_create: function () {
         this.input.focus().blur();
},

OR

$('#myComboBox').next().find('input').focus().blur();

这篇关于jQuery ui组合框在IE 10中默认打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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