Bootstrap: Allow Modals without backdrop be hidden on an outside click

Created on 11 Sep 2012  路  4Comments  路  Source: twbs/bootstrap

I understood that adding an "outside" click event would complexify the modal plugin, right ?

One workaround is to always show the .modal-backdrop when backdrop option is set to false and set modal-backdrop opacity to 0.

You could also add a new boolean click option to close or not modals on click and drop the static value.

js

Most helpful comment

Why is this question still closed? I think it will make sense. In this case there should be three option:
backdrop: true / false
keyboard: true / false
outsideclick: true / false (see: http://stackoverflow.com/questions/152975/how-to-detect-a-click-outside-an-element)

All 4 comments

Hey @younes0,

Thanks for opening this issue! Unfortunately, it looks like it fails to pass the criteria neccessary for submitting to bootstrap. The following things are currently failing:

  • should include a jsfiddle/jsbin illustrating the problem if tagged with js but not a feature

For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines.

thanks!

i don't understand what you're requesting sorry

Sorry, I did explain the "How" but not the "Why" of this feature:

Actually, Modals with No Backdrop aren't hidden when user click outside of it or press keyboard (right ?)

According to this :
http://ux.stackexchange.com/questions/8425/when-to-use-darkened-backgrounds-behind-modal-windows

Darkening the parent window is essentially a visual indicator to the user that the window is inactive. If the parent window does not change visually when the modal is shown, the user will think that the screen behind is still active. If the user clicks on something on the they will become frustrated that for no apparent reason it does not work.

In my understanding, modals with No backdrop should be less important and be exited once the user clicks outside or type keyboard, what do you think ?

Why is this question still closed? I think it will make sense. In this case there should be three option:
backdrop: true / false
keyboard: true / false
outsideclick: true / false (see: http://stackoverflow.com/questions/152975/how-to-detect-a-click-outside-an-element)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tiendq picture tiendq  路  3Comments

steve-32a picture steve-32a  路  3Comments

devfrey picture devfrey  路  3Comments

bellwood picture bellwood  路  3Comments

eddywashere picture eddywashere  路  3Comments