diff options
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 |