From 9d373d71129d656b200690ef97229f8b98bb8eae Mon Sep 17 00:00:00 2001 From: Mr_Green Date: Thu, 7 Dec 2017 16:40:18 +0530 Subject: [PATCH] Use only transitionend event (#24962) --- js/src/util.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/js/src/util.js b/js/src/util.js index ef2cc3c57f..c2f7ad4538 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -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) {