소스 검색

fix initSelection with empty input value

norlin 12 년 전
부모
커밋
c8cae0a6c9
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -1805,6 +1805,7 @@ the specific language governing permissions and limitations under the Apache Lic
         initSelection: function () {
             var selected;
             if (this.opts.element.val() === "" && this.opts.element.text() === "") {
+                this.updateSelection([]);
                 this.close();
                 this.setPlaceholder();
             } else {