diff --git a/js/src/dom/eventHandler.js b/js/src/dom/eventHandler.js
index dda1eb216f5fe11d7531570d2b3393f3d95d99dc..25248fb92ffb4699a31dcfae311a9508e598f338 100644
--- a/js/src/dom/eventHandler.js
+++ b/js/src/dom/eventHandler.js
@@ -307,18 +307,4 @@ const EventHandler = (() => {
   }
 })()
 
-// focusin and focusout polyfill
-if (Polyfill.focusIn) {
-  (() => {
-    function listenerFocus(event) {
-      EventHandler.trigger(event.target, 'focusin')
-    }
-    function listenerBlur(event) {
-      EventHandler.trigger(event.target, 'focusout')
-    }
-    EventHandler.on(document, 'focus', 'input', listenerFocus)
-    EventHandler.on(document, 'blur', 'input', listenerBlur)
-  })()
-}
-
 export default EventHandler
diff --git a/js/src/index.js b/js/src/index.js
index aa35ed07b30b35894b2c11b15566960936ddbf1a..0c662873df3cdcd3d90837064471549b65016bbb 100644
--- a/js/src/index.js
+++ b/js/src/index.js
@@ -3,7 +3,9 @@ import Button from './button'
 import Carousel from './carousel'
 import Collapse from './collapse'
 import Dropdown from './dropdown'
+import EventHandler from './dom/eventHandler'
 import Modal from './modal'
+import Polyfill from './dom/polyfill'
 import Popover from './popover'
 import ScrollSpy from './scrollspy'
 import Tab from './tab'
@@ -18,6 +20,21 @@ import Util from './util'
  * --------------------------------------------------------------------------
  */
 
+/* istanbul ignore next */
+// focusin and focusout polyfill
+if (Polyfill.focusIn) {
+  (() => {
+    function listenerFocus(event) {
+      EventHandler.trigger(event.target, 'focusin')
+    }
+    function listenerBlur(event) {
+      EventHandler.trigger(event.target, 'focusout')
+    }
+    EventHandler.on(document, 'focus', 'input', listenerFocus)
+    EventHandler.on(document, 'blur', 'input', listenerBlur)
+  })()
+}
+
 export {
   Util,
   Alert,