Twitter bootstrap – modal not working in firefox

Quick heads up for those having issues getting the modal window in the twitter bootstrap to work in firefox, I had a problem where the overlay would show but not the actual modal window content. Seems there is a problem if you’re using animation (fade etc).

See here for more information.

For now we use no animation, so a typical modal source example might be (note: no animation as is the default in the docs):

<div id="preview-modal" class="modal hide">
	<div class="modal-header">
		<a href="#" class="close">&times;</a>
		<h3>Modal Heading</h3>
	</div>
	<div class="modal-body">
		<p>One fine body…</p>
	</div>
	<div class="modal-footer">
		<a href="#" class="btn primary">Primary</a>
		<a href="#" class="btn secondary">Secondary</a>
	</div>
</div>

Typically there is “fade” in the class of the parent div which we’ve removed.

Post a Comment or Leave a Trackback

3 Comments

  1. Peter Pham
    October 27, 2011 at 11:25 am | Permalink

    It was working for me, along with the animation, on Firefox. However, I found that the modal is very unresponsive when there are multiple modals set up on the same page. I think the modal object was initialized rather slowly.

  2. October 27, 2011 at 11:30 am | Permalink

    Yeah strange, the ticket suggests as much except it was just really buggy for me…usually not working. As soon as I removed “fade” it was perfect.

  3. Matt
    November 20, 2011 at 6:21 pm | Permalink

    Thanks for your post it helped. One thing i found was if using Boostrap with DJANGO and you are using templates, you must put the calls to the .js files in your base.html, not in the extended template.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*