问题
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