Selaa lähdekoodia

Fixed Chrome issue: lost focus after selecting a value

ToreOlavKristiansen 8 vuotta sitten
vanhempi
commit
45ee7340e5
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/js/select2/selection/base.js

+ 3 - 0
src/js/select2/selection/base.js

@@ -82,6 +82,9 @@ define([
       self.$selection.removeAttr('aria-owns');
 
       self.$selection.focus();
+      window.setTimeout(function () {
+        self.$selection.focus();
+      }, 0);
 
       self._detachCloseHandler(container);
     });