jackhao jackhao - 3 months ago 15
Javascript Question

Bootstrap modal dismiss if user click anywhere else..how to prevent this?

I am using Twitter's Bootstrap modal.

The modal is dismissed whenever the user clicks anywhere else on the screen except the modal.

Is there a way I can prevent this, so the user has to click the Close button to dismiss the modal?

Best,

Answer

you can pass these options:

{
  keyboard: false,
  backdrop: 'static'
}
Comments