Skip to content

Commit

Permalink
Use only transitionend event (#24962)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamlekar authored and Johann-S committed Dec 7, 2017
1 parent af34799 commit 9d373d7
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions js/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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) {
Expand Down

0 comments on commit 9d373d7

Please sign in to comment.