jQuery ui combo-box opens on default in IE 10

和自甴很熟 提交于 2019-12-25 08:48:03

问题


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();

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


回答1:


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();


来源:https://stackoverflow.com/questions/30026328/jquery-ui-combo-box-opens-on-default-in-ie-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!