How can I not close the twitter-bootstrap modal by clicking outside the area?

10

I do not know if it has, but I need to block the closure of the twitter-bootstrap modal when the user clicks outside the element area, only allowing to close it by clicking the close buttons.

    
asked by anonymous 05.03.2014 / 18:12

1 answer

20

According to the documentation , just put the data-backdrop="static" attribute in your modal:

<div class="modal fade" data-backdrop="static">
    ...
</div>
    
05.03.2014 / 18:16