1
0
mirror of synced 2025-02-11 01:29:23 +03:00

fix performance issue in firefox. fixes #382

This commit is contained in:
Igor Vaynberg 2012-09-06 09:17:24 -07:00
parent cb44a86649
commit 281f314fd7

View File

@ -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}); $.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 * also takes care of clicks on label tags that point to the source element
*/ */
$(document).ready(function () { $(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; var target = $(e.target).closest("div.select2-container").get(0), attr;
if (target) { if (target) {
$(document).find("div.select2-container-active").each(function () { $(document).find("div.select2-container-active").each(function () {