Kaynağa Gözat

Merge pull request #1684 from jdecuyper/feature-avoid-removal-of-locked-options

Avoid locked options to be selected and deleted.
Igor Vaynberg 11 yıl önce
ebeveyn
işleme
2d401b19ce
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -2445,7 +2445,7 @@ the specific language governing permissions and limitations under the Apache Lic
             this.selection = selection = this.container.find(selector);
 
             var _this = this;
-            this.selection.on("click", ".select2-search-choice", function (e) {
+            this.selection.on("click", ".select2-search-choice:not(.select2-locked)", function (e) {
                 //killEvent(e);
                 _this.search[0].focus();
                 _this.selectChoice($(this));