Sharing ideas

Solving problems

Gathering solutions

Exchanging thoughts

Ruby On Rails



Debian & Ubuntu
jQuery & CSS

Bootstrap 2.3.0 and Lightbox/fancybox Crash Issue

After upgrading bootstrap to version 2.3.0 I spent an evening trying to figure out what’s causing too much recursion error that was in the end crashing my entire browser when using lightbox or fancybox. Then I said – frak it, it’s time to get some rest and in the morning I decided to visit github issues section first – and let me say I should start there, because there it was – waiting for me – exactly the same problem with possible solution :P. Issue #6862 is the right place for you. Thanks to the fellow programmer called Yohn I didn’t had to waste no more time, so here we go:

You need to edit dropdown.js file and replace:

.on('.dropdown-menu', function (e) { e.stopPropagation() })


.on('click.dropdown-menu', function (e) { e.stopPropagation() })

And that’s it. If you are using Rails and bootstrap-sass gem – load only required js files in you applicaion.js and then clone bootstrap-dropdown.js to vendor/assets/javascripts directory, patch the file and load that patched one instead of original. This will to the trick until it is fixed (if it ever will, apparently third party tools are not supported by Boostrap, but I don’t see the reason why should they break it on the way).