Commit 20c099d4 authored by Chris Rebert's avatar Chris Rebert
Browse files

add failing test for #13268

parent 3b99a412
5 merge requests!28721Hot test,!13752Proposed fix for #13268,!16605Test pull please ignore,!22103test,!25326Adjust examples
Showing with 27 additions and 0 deletions
+27 -0
......@@ -557,4 +557,31 @@ $(function () {
$('head #test').remove()
$('head #viewport-style').remove()
})
test('should not error when trying to show an auto-placed tooltip that has been removed from the dom', function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').appendTo('#qunit-fixture')
tooltip
.one('show.bs.tooltip', function () {
tooltip.remove()
})
.bootstrapTooltip({ placement: 'auto' })
var passed = true
try {
tooltip.bootstrapTooltip('show')
}
catch (err) {
passed = false
console.log(err)
}
ok(passed, '.tooltip(\'show\') should not throw an error in this case')
try {
tooltip.remove()
}
catch (err) {
// tooltip may have already been removed
}
})
})
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