无法在Select2下拉列表输入搜索字段(http://kevin-brown.com/select2/)
我发现许多问题都提到了同样的问题,但对我都没有用 (https://www.google.com/search?q=can%27t+type+in+select2&ie=utf-8&oe=utf-8&client=firefox-b-ab)。我使用jQuery在模态对话框中的Select2下拉列表输入搜索字段时无法输入。顺便说一句,我可以从下拉列表中选择值。尝试插入tabindex:0,但没有运气。
代码:
$.ajax({
type: "POST",
url: "<?php echo $myScripts; ?>",
data: { id1: "get-release-dropdown-html", id100: "<?php echo $dbTable; ?>" },
success:function(releaseDropdown){
$('#progress').hide();
$( "#modelDialog1" ).dialog({
modal: true,
width: '570',
height: '600',
resizable: true,
position:
{
my: "center",
at: "center",
of: window,
},
title: "Trigger Build",
open: function() {
$(this).html("<br/>Please select job options.<br/><br/><br/><b>Release:</b>" + releaseDropdown + "<div style='margin-top:30px;'/><b>Build Release Candidate:</b><select id='sReleaseCandidate'><option value='ga' selected>GA</option><option value='beta1'>BETAX</option>'></br>");
$("#sDescription").focus();
$("#sRelease, #sReleaseCandidate").select2({
tags: true
});
},
close: function() {
$( this ).dialog( "close" );
},
});
}
});