1

我无法将文本框集中在单击下拉列表时出现的窗格中,如图所示: 在此处输入图像描述

这是我正在使用的代码:

          $("#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/

4

1 回答 1

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

小提琴http://jsfiddle.net/jaMda/

于 2012-11-26T12:36:44.333 回答