twitter/bootstrap — Issue #820: bootstrap does not behave well when compiled with Google Closure
Author: ChrisCinelli
Created: 2011-12-17 02:02:21+00:00
State: open

Modal dialog does not fade in when it is compiled with Google closure compiler with option: SIMPLE_OPTIMIZATIONS
This will test the problem:

This one will open it Open

×

Modal Heading

One fine body…

Primary
Secondary

The problem I think is this code in bootstrap-modal.js that does not get compiled:
if (transition) {
that.$element[0].offsetWidth // force reflow
}

I reported also on Google Code: http://code.google.com/p/closure-compiler/issues/detail?id=627
I think that Google Closure is a pretty common way to minimize Javascript and probably the method that minimized the most improving also performances.
I think that Bootstrap javascript code is a little peculiar sometimes and the style that you use sometimes is a little hacky.
Regardless, I think that on both Google and Twitter sides, there should be an effort to make Google Closure and Bootstrap works together.