Browse Source

do not hide search field when disabled because it also hides the placeholder. fixes #272

Igor Vaynberg 12 năm trước cách đây
mục cha
commit
38b9e935f0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -1700,7 +1700,7 @@
 
             this.parent.enable.apply(this, arguments);
 
-            this.search.show();
+            this.search.removeAttr("disabled");
         },
 
         // multi
@@ -1709,7 +1709,7 @@
 
             this.parent.disable.apply(this, arguments);
 
-            this.search.hide();
+            this.search.attr("disabled", true);
         },
 
         // multi