Explorar o código

support readonly attribute by disabling select2. fixes #293

Igor Vaynberg %!s(int64=13) %!d(string=hai) anos
pai
achega
15b654a170
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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