1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 13:13:03 +02:00

Fix JS components console error "Error: <Component> is transitioning"

This commit is contained in:
Pierre Vanduynslager
2017-03-28 17:43:16 -04:00
committed by Johann-S
parent ce0e2f8e76
commit 48c5efa4c3
16 changed files with 101 additions and 155 deletions

View File

@@ -187,26 +187,6 @@
}
}
// Should throw an error because modal is in transition
function testModalTransitionError() {
var err = false
// Close #myModal
$('#myModal').on('shown.bs.modal', function () {
$('#myModal').modal('hide').off('shown.bs.modal')
if (!err) {
alert('No error thrown for : testModalTransitionError')
}
})
try {
$('#myModal').modal('show').modal('hide')
}
catch (e) {
err = true
console.error(e.message)
}
}
$(function () {
$('[data-toggle="popover"]').popover()
$('[data-toggle="tooltip"]').tooltip()
@@ -219,7 +199,6 @@
$('#firefoxModal').on('focus', reportFirefoxTestResult.bind(false))
$('#ff-bug-input').on('focus', reportFirefoxTestResult.bind(true))
})
testModalTransitionError()
})
</script>
</body>