Pārlūkot izejas kodu

issue #77, blur on touchend - seems more native

Igor Vaynberg 13 gadi atpakaļ
vecāks
revīzija
3ba3e57715
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -317,7 +317,7 @@
      * blurs any Select2 container that has focus when an element outside them was clicked or received focus
      * blurs any Select2 container that has focus when an element outside them was clicked or received focus
      */
      */
     $(document).ready(function () {
     $(document).ready(function () {
-        $(document).delegate("*", "mousedown focusin touchstart", function (e) {
+        $(document).delegate("*", "mousedown focusin touchend", function (e) {
             var target = $(e.target).closest("div.select2-container").get(0);
             var target = $(e.target).closest("div.select2-container").get(0);
             $(document).find("div.select2-container-active").each(function () {
             $(document).find("div.select2-container-active").each(function () {
                 if (this !== target) $(this).data("select2").blur();
                 if (this !== target) $(this).data("select2").blur();