mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 13:46:42 +02:00
clean up dead elements in firefox (which is droping transitionEnd events :(
This commit is contained in:
13
js/bootstrap-twipsy.js
vendored
13
js/bootstrap-twipsy.js
vendored
@@ -164,13 +164,20 @@
|
|||||||
|
|
||||||
$tip.removeClass('in')
|
$tip.removeClass('in')
|
||||||
|
|
||||||
function removeElement () {
|
function removeWithAnimation() {
|
||||||
|
var timeout = setTimeout(function () {
|
||||||
|
$tip.off($.support.transition.end).remove()
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
$tip.one($.support.transition.end, function () {
|
||||||
|
clearTimeout(timeout)
|
||||||
$tip.remove()
|
$tip.remove()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$.support.transition && this.$tip.hasClass('fade') ?
|
$.support.transition && this.$tip.hasClass('fade') ?
|
||||||
$tip.on($.support.transition.end, removeElement) :
|
removeWithAnimation() :
|
||||||
removeElement()
|
$tip.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
, fixTitle: function () {
|
, fixTitle: function () {
|
||||||
|
Reference in New Issue
Block a user