Permalink
Browse files

fix performance issue in firefox. fixes #382

  • Loading branch information...
1 parent cb44a86 commit 281f314fd72f96ea6117fa9c0e21abd642508d6d @ivaynberg ivaynberg committed Sep 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 select2.js
View
@@ -162,7 +162,7 @@
});
}
- $(document).delegate("*", "mousemove", function (e) {
+ $(document).delegate("body", "mousemove", function (e) {
$.data(document, "select2-lastpos", {x: e.pageX, y: e.pageY});
});
@@ -494,7 +494,7 @@
* also takes care of clicks on label tags that point to the source element
*/
$(document).ready(function () {
- $(document).delegate("*", "mousedown touchend", function (e) {
+ $(document).delegate("body", "mousedown touchend", function (e) {
var target = $(e.target).closest("div.select2-container").get(0), attr;
if (target) {
$(document).find("div.select2-container-active").each(function () {

0 comments on commit 281f314

Please sign in to comment.