twitter/bootstrap — pull request #7660 by tgriesser (2013-04-22 21:07:38+00:00)
Title: Close modal when clicking on the background

Because `.modal` takes up the entire screen now, clicks won't reach the background div... This binds to the the `.modal` area, checking if `e.target === e.currentTarget`, which will only be the case if you're clicking outside of the `.modal-content` area.

Test included, semicolons excluded.