Selaa lähdekoodia

fix clearing when using jquery 1.6. fixes #386

Igor Vaynberg 12 vuotta sitten
vanhempi
commit
6690cc449c
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      select2.js

+ 5 - 1
select2.js

@@ -230,6 +230,10 @@
         event.preventDefault();
         event.stopPropagation();
     }
+    function killEventImmediately(event) {
+        event.preventDefault();
+        event.stopImmediatePropagation();
+    }
 
     function measureTextWidth(e) {
         if (!sizer){
@@ -1578,7 +1582,7 @@
             selection.delegate("abbr", "mousedown", this.bind(function (e) {
                 if (!this.enabled) return;
                 this.clear();
-                killEvent(e);
+                killEventImmediately(e);
                 this.close();
                 this.triggerChange();
                 this.selection.focus();