소스 검색

Fix placeholder missing on tab out on input tags

Tabbing out of input tags with multiple set as true and no value
selected will result in the default placeholder not being shown.
This patch fixes the issue by calling clearSearch() on blur of
MultiSelect2 and preventing the bubbling of the blur event to the
abstract class.

Test case with version 3.2: http://jsfiddle.net/pmirshad/PqP2L/1/
pmirshad 12 년 전
부모
커밋
5cf5deb267
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      select2.js

+ 3 - 0
select2.js

@@ -1867,6 +1867,9 @@
 
             this.search.bind("blur", this.bind(function() {
                 this.container.removeClass("select2-container-active");
+                this.search.removeClass("select2-focused");
+                this.clearSearch();
+                e.stopImmediatePropagation();
             }));
 
             this.container.delegate(selector, "mousedown", this.bind(function (e) {