Browse Source

Fixed Chrome issue: lost focus after selecting a value

ToreOlavKristiansen 8 năm trước cách đây
mục cha
commit
45ee7340e5
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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);
     });