Skip to content

Commit

Permalink
fix clearing when using jquery 1.6. fixes #386
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaynberg committed Sep 12, 2012
1 parent 2adb8d3 commit 6690cc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion select2.js
Expand Up @@ -230,6 +230,10 @@
event.preventDefault();
event.stopPropagation();
}
function killEventImmediately(event) {
event.preventDefault();
event.stopImmediatePropagation();
}

function measureTextWidth(e) {
if (!sizer){
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6690cc4

Please sign in to comment.