任何人都可以使用css帮助避免这个问题,我试过但直到现在都没有解决方案。看起来它与容器的高度有关,因为内容与弹出高度平行切割!
//Initialize validation logic when a form is created
formCreated: function (event, data) {
selectedToTac = $('#Edit-ToTacticID').val();
selectedFromTac = $('#Edit-FromTacticID').val();
$('#Edit-ToTacticID, #Edit-FromTacticID').empty();
data.form.css('width', '450px');
data.form.css('height', '120px');
data.form.css('overflow-x', 'hidden');
data.form.css('overflow-y', 'hidden');
data.form.find('select[name=FromTacticID]').css('width', '430px');
data.form.find('select[name=ToTacticID]').css('width', '430px');
$.ajax({
url: window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + '/default.aspx/GetGroupTacticOptions',
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
CreateSelectOpt(data);
$("#Edit-FromTacticID").trigger("chosen:updated");
$("#Edit-ToTacticID").trigger("chosen:updated");
},
error: function (msg) {
//error
}
});
$("#Edit-FromTacticID").chosen({
placeholder_text_single: 'Select a stage',
overflow_container: $(".scrolling-div")
});
$("#Edit-ToTacticID").chosen({
placeholder_text_single: 'Select a stage',
overflow_container: $(".scrolling-div")
});
data.form.validationEngine();
},
//Validate form when it is being submitted