diff options
author | Pierre Vanduynslager <pierre.denis.vanduynslager@gmail.com> | 2017-03-29 00:43:16 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2017-03-29 00:43:15 +0300 |
commit | 48c5efa4c3c439d8720b8475ec3e372c6974a12a (patch) | |
tree | 927c262f444f4aaeb0f598cf35ab7b1b385ae76a /js/tests/visual/carousel.html | |
parent | ce0e2f8e76dade4b6ec9d6eb541c6988739f0653 (diff) |
Fix JS components console error "Error: <Component> is transitioning"
Diffstat (limited to 'js/tests/visual/carousel.html')
-rw-r--r-- | js/tests/visual/carousel.html | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/js/tests/visual/carousel.html b/js/tests/visual/carousel.html index b02d28a053..ad249d874d 100644 --- a/js/tests/visual/carousel.html +++ b/js/tests/visual/carousel.html @@ -45,31 +45,11 @@ <script src="../../dist/carousel.js"></script> <script> - // Should throw an error because carousel is in transition - function testCarouselTransitionError() { - var err = false - var $carousel = $('#carousel-example-generic') - $carousel.on('slid.bs.carousel', function () { - $carousel.off('slid.bs.carousel') - if (!err) { - alert('No error thrown for : testCarouselTransitionError') - } - }) - try { - $carousel.carousel('next').carousel('prev') - } - catch (e) { - err = true - console.error(e.message) - } - } - - $(function () { + $(function() { // Test to show that the carousel doesn't slide when the current tab isn't visible - $('#carousel-example-generic').on('slid.bs.carousel', function (event) { + $('#carousel-example-generic').on('slid.bs.carousel', function(event) { console.log('slid at ', event.timeStamp) }) - testCarouselTransitionError() }) </script> </body> |