]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use only transitionend event (#24962)
authorMr_Green <kamlekar.venkatesh@gmail.com>
Thu, 7 Dec 2017 11:10:18 +0000 (16:40 +0530)
committerJohann-S <johann.servoire@gmail.com>
Thu, 7 Dec 2017 11:10:18 +0000 (12:10 +0100)
js/src/util.js

index ef2cc3c57f4d4f267b62af8428b763c8cfc3dfcc..c2f7ad45382ace74cdc290bf93c85fe0b28607ab 100644 (file)
@@ -20,11 +20,6 @@ const Util = (($) => {
 
   const MAX_UID = 1000000
 
-  const TransitionEndEvent = {
-    WebkitTransition : 'webkitTransitionEnd',
-    transition       : 'transitionend'
-  }
-
   // shoutout AngusCroll (https://goo.gl/pxwQGp)
   function toType(obj) {
     return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
@@ -48,17 +43,9 @@ const Util = (($) => {
       return false
     }
 
-    const el = document.createElement('bootstrap')
-
-    for (const name in TransitionEndEvent) {
-      if (typeof el.style[name] !== 'undefined') {
-        return {
-          end: TransitionEndEvent[name]
-        }
-      }
+    return {
+      end: 'transitionend'
     }
-
-    return false
   }
 
   function transitionEndEmulator(duration) {