소스 검색

fix performance issue in firefox. fixes #382

Igor Vaynberg 12 년 전
부모
커밋
281f314fd7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      select2.js

+ 2 - 2
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 () {