mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Use only transitionend event (#24962)
This commit is contained in:
parent
af34799eda
commit
9d373d7112
@ -20,11 +20,6 @@ const Util = (($) => {
|
|||||||
|
|
||||||
const MAX_UID = 1000000
|
const MAX_UID = 1000000
|
||||||
|
|
||||||
const TransitionEndEvent = {
|
|
||||||
WebkitTransition : 'webkitTransitionEnd',
|
|
||||||
transition : 'transitionend'
|
|
||||||
}
|
|
||||||
|
|
||||||
// shoutout AngusCroll (https://goo.gl/pxwQGp)
|
// shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||||
function toType(obj) {
|
function toType(obj) {
|
||||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||||
@ -48,18 +43,10 @@ const Util = (($) => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const el = document.createElement('bootstrap')
|
|
||||||
|
|
||||||
for (const name in TransitionEndEvent) {
|
|
||||||
if (typeof el.style[name] !== 'undefined') {
|
|
||||||
return {
|
return {
|
||||||
end: TransitionEndEvent[name]
|
end: 'transitionend'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
function transitionEndEmulator(duration) {
|
function transitionEndEmulator(duration) {
|
||||||
let called = false
|
let called = false
|
||||||
|
Loading…
Reference in New Issue
Block a user