mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
clean up dead elements in firefox (which is droping transitionEnd events :(
This commit is contained in:
parent
4ef5a90445
commit
12868933b9
15
js/bootstrap-twipsy.js
vendored
15
js/bootstrap-twipsy.js
vendored
@ -164,13 +164,20 @@
|
||||
|
||||
$tip.removeClass('in')
|
||||
|
||||
function removeElement () {
|
||||
$tip.remove()
|
||||
function removeWithAnimation() {
|
||||
var timeout = setTimeout(function () {
|
||||
$tip.off($.support.transition.end).remove()
|
||||
}, 500)
|
||||
|
||||
$tip.one($.support.transition.end, function () {
|
||||
clearTimeout(timeout)
|
||||
$tip.remove()
|
||||
})
|
||||
}
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
$tip.on($.support.transition.end, removeElement) :
|
||||
removeElement()
|
||||
removeWithAnimation() :
|
||||
$tip.remove()
|
||||
}
|
||||
|
||||
, fixTitle: function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user