Closed kshitizshankar closed 11 years ago
This would be the case.. The loader script is a beast.. and I only provided it for folks using Mercury outside of rails.
The loader works like this:
That's why you're seeing the double load of bootstrap -- the problem can arise in many ways with the loader technique. You may want to look at how the Rails setup behaves and duplicate that in your environment. That way you won't have the issue.
hmm ok, I'll try to go through the rails environment.
The loader script is going away in Mercury 2. Hopefully you were able to work it out.
Hi,
I am trying to add the bootstrap.js file in the development package in mercury_loader.js. I am using few components of bootstrap in one of the panels.
Now when I load a page which also contains the bootstrap.js file as one of the scripts, it starts messing up my components in the editor (in a custom panel).
I tried to setup bootstrap in a similar scenario (a parent window and an iframe, both contain the bootstrap.js files) and it works. http://jsfiddle.net/mmfansler/wxeY7/
I was unable to pin point the exact problem, but I checked that my bootstrap events start getting fired twice.