Commit 12868933 authored by Jacob Thornton's avatar Jacob Thornton
Browse files

clean up dead elements in firefox (which is droping transitionEnd events :(

parent 4ef5a904
Showing with 11 additions and 4 deletions
+11 -4
...@@ -164,13 +164,20 @@ ...@@ -164,13 +164,20 @@
$tip.removeClass('in') $tip.removeClass('in')
function removeElement () { function removeWithAnimation() {
$tip.remove() 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') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip.on($.support.transition.end, removeElement) : removeWithAnimation() :
removeElement() $tip.remove()
} }
, fixTitle: function () { , fixTitle: function () {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment