Browse Source

fixed opening and closing of dropdown when an element is removed from selection. fixes #287

Igor Vaynberg 13 năm trước cách đây
mục cha
commit
bef4af91f8
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -1881,6 +1881,7 @@
             formatted=this.opts.formatSelection(data, choice);
             formatted=this.opts.formatSelection(data, choice);
             choice.find("div").replaceWith("<div>"+escapeMarkup(formatted)+"</div>");
             choice.find("div").replaceWith("<div>"+escapeMarkup(formatted)+"</div>");
             choice.find(".select2-search-choice-close")
             choice.find(".select2-search-choice-close")
+                .bind("mousedown", killEvent)
                 .bind("click dblclick", this.bind(function (e) {
                 .bind("click dblclick", this.bind(function (e) {
                 if (!this.enabled) return;
                 if (!this.enabled) return;