diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2012-10-18 10:36:22 +0400 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2012-10-18 10:36:22 +0400 |
commit | 45046544a671b5bb27f1631c9a1bef453b3ca325 (patch) | |
tree | cf5a8244304dedabecbb411083287f63b2df571e /js | |
parent | 0b9d4e78ad5e5ad2f6f34735f0ac73463e1d1af9 (diff) |
when static, refocus on click
Diffstat (limited to 'js')
-rw-r--r-- | js/bootstrap-modal.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 185519aaf8..57284dd788 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -162,9 +162,11 @@ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') .appendTo(document.body) - if (this.options.backdrop != 'static') { - this.$backdrop.click($.proxy(this.hide, this)) - } + this.$backdrop.click( + this.options.backdrop == 'static' ? + $.proxy(this.$element[0].focus, this.$element[0]) + : $.proxy(this.hide, this) + ) if (doAnimate) this.$backdrop[0].offsetWidth // force reflow |