瀏覽代碼

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 {