mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 11:21:23 +02:00
Fix JS components console error "Error: <Component> is transitioning"
This commit is contained in:
committed by
Johann-S
parent
ce0e2f8e76
commit
48c5efa4c3
@@ -41,26 +41,7 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
testTooltipTransitionError()
|
||||
})
|
||||
|
||||
// Should throw an error because tooltip is in transition
|
||||
function testTooltipTransitionError() {
|
||||
var err = false
|
||||
$('#btnOne').on('shown.bs.tooltip', function () {
|
||||
$('#btnOne').tooltip('hide').off('shown.bs.tooltip')
|
||||
if (!err) {
|
||||
alert('No error thrown for : testTooltipTransitionError')
|
||||
}
|
||||
})
|
||||
try {
|
||||
$('#btnOne').tooltip('show').tooltip('hide')
|
||||
}
|
||||
catch (e) {
|
||||
err = true
|
||||
console.error(e.message)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user