Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-10-18 10:36:22 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-10-18 10:36:22 +0400
commit45046544a671b5bb27f1631c9a1bef453b3ca325 (patch)
treecf5a8244304dedabecbb411083287f63b2df571e /js
parent0b9d4e78ad5e5ad2f6f34735f0ac73463e1d1af9 (diff)
when static, refocus on click
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-modal.js8
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