From 281f314fd72f96ea6117fa9c0e21abd642508d6d Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 6 Sep 2012 09:17:24 -0700 Subject: [PATCH] fix performance issue in firefox. fixes #382 --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 42ce0a92..2b5e5c4e 100755 --- a/select2.js +++ b/select2.js @@ -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 () {