]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move transition end detection to dom/event.js instead of util.js
authorJohann-S <johann.servoire@gmail.com>
Mon, 21 Aug 2017 06:08:12 +0000 (08:08 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 20 Feb 2019 20:05:45 +0000 (22:05 +0200)
js/src/util.js

index 989d9644fc7794ba2005f634641349922e8b54b8..2ffdec999bd4518d0a0bda5b9c96b4717f83b3af 100644 (file)
@@ -22,46 +22,6 @@ function toType(obj) {
   return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase()
 }
 
-function getSpecialTransitionEndEvent() {
-  return {
-    bindType: TRANSITION_END,
-    delegateType: TRANSITION_END,
-    handle(event) {
-      if ($(event.target).is(this)) {
-        return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
-      }
-      return undefined // eslint-disable-line no-undefined
-    }
-  }
-}
-
-function transitionEndEmulator(duration) {
-  let called = false
-
-  $(this).one(Util.TRANSITION_END, () => {
-    called = true
-  })
-
-  setTimeout(() => {
-    if (!called) {
-      Util.triggerTransitionEnd(this)
-    }
-  }, duration)
-
-  return this
-}
-
-function setTransitionEndSupport() {
-  $.fn.emulateTransitionEnd = transitionEndEmulator
-  $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()
-}
-
-/**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
 const Util = {
 
   TRANSITION_END: 'bsTransitionEnd',