我无法将文本框聚焦在单击下拉列表的窗格中,如图所示:
以下是我正在使用的代码:
$("#dialog-modal").dialog({
title: "Upload to: FolderNameGoesHere",
width: 720,
height: 450,
dialogClass: "file-upload-modal",
modal: true,
buttons: {
"Save": function () {
$(this).dialog("close");
},
"Cancel": function () {
$(this).dialog("close");
}
}
});
// Fix input element click problem
$('.input-append').click(function (e) {
//$(this).focus();
e.stopPropagation();
});
这是现场js小提琴http://jsfiddle.net/5nDUf/1/
答案 0 :(得分:1)
莫代尔试图偷走你身边的一切:)
$('.input-append').click(function (e) {
//$(this).focus();
e.stopPropagation();
});
应该是
// Fix input element click problem
$('.input-append').bind('click mouseup mousedown keypress keydown keyup', function (e) {
e.stopPropagation();
});