Просмотр исходного кода

support readonly attribute by disabling select2. fixes #293

Igor Vaynberg 12 лет назад
Родитель
Сommit
15b654a170
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      select2.js

+ 1 - 1
select2.js

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