aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfat <[email protected]>2013-07-17 21:30:38 -0700
committerfat <[email protected]>2013-07-17 21:30:38 -0700
commit2cccc0889f63503d3a56ed80b3f0cde3424a5aff (patch)
treee5f7755fcb91e554a2bcc82c313bdb400cec7a3f /js
parenta7a9a1437914a86674c3fe9277484fcad21b08e8 (diff)
downloadbootstrap-2cccc0889f63503d3a56ed80b3f0cde3424a5aff.tar.xz
bootstrap-2cccc0889f63503d3a56ed80b3f0cde3424a5aff.zip
make sure triggering element is visible before focusing #7521
Diffstat (limited to 'js')
-rw-r--r--js/modal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/modal.js b/js/modal.js
index 81766b323..7433de4c8 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -232,7 +232,7 @@
$target
.modal(option)
.one('hide', function () {
- $this.focus()
+ $this.is(':visible') && $this.focus()
})
})