Skip to content

Commit 281f314

Browse files
committed
fix performance issue in firefox. fixes select2#382
1 parent cb44a86 commit 281f314

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
});
163163
}
164164

165-
$(document).delegate("*", "mousemove", function (e) {
165+
$(document).delegate("body", "mousemove", function (e) {
166166
$.data(document, "select2-lastpos", {x: e.pageX, y: e.pageY});
167167
});
168168

@@ -494,7 +494,7 @@
494494
* also takes care of clicks on label tags that point to the source element
495495
*/
496496
$(document).ready(function () {
497-
$(document).delegate("*", "mousedown touchend", function (e) {
497+
$(document).delegate("body", "mousedown touchend", function (e) {
498498
var target = $(e.target).closest("div.select2-container").get(0), attr;
499499
if (target) {
500500
$(document).find("div.select2-container-active").each(function () {

0 commit comments

Comments
 (0)