Browse Source

support readonly attribute by disabling select2. fixes #293

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

+ 1 - 1
select2.js

@@ -559,7 +559,7 @@
                 this.monitorSource();
             }
 
-            if (opts.element.is(":disabled")) this.disable();
+            if (opts.element.is(":disabled") || opts.element.is("[readonly='readonly']")) this.disable();
         },
 
         // abstract