Browse files

bind abbr handler before mousedown. fixes #386

  • Loading branch information...
1 parent ab7ab5b commit 908c3583d7b4bbb388b424f86354c362bdfcf695 @ivaynberg ivaynberg committed Sep 13, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 select2.js
View
18 select2.js
@@ -1497,6 +1497,15 @@
window.setTimeout(this.bind(function() { this.selection.attr("tabIndex", this.opts.element.attr("tabIndex")); }), 10);
}));
+ selection.delegate("abbr", "mousedown", this.bind(function (e) {
+ if (!this.enabled) return;
+ this.clear();
+ killEventImmediately(e);
+ this.close();
+ this.triggerChange();
+ this.selection.focus();
+ }));
+
selection.bind("mousedown", this.bind(function (e) {
clickingInside = true;
@@ -1580,15 +1589,6 @@
killEvent(e);
}));
- selection.delegate("abbr", "mousedown", this.bind(function (e) {
- if (!this.enabled) return;
- this.clear();
- killEventImmediately(e);
- this.close();
- this.triggerChange();
- this.selection.focus();
- }));
-
this.setPlaceholder();
this.search.bind("focus", this.bind(function() {

0 comments on commit 908c358

Please sign in to comment.