aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/modal.js2
-rw-r--r--js/tests/unit/modal.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/js/modal.js b/js/modal.js
index 29eedf117..060ea6b82 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -166,7 +166,7 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(this.$body)
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+ this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js
index a415129aa..35a92a33b 100644
--- a/js/tests/unit/modal.js
+++ b/js/tests/unit/modal.js
@@ -154,7 +154,7 @@ $(function () {
ok($('#modal-test').length, 'modal insterted into dom')
$('.contents').click()
ok($('#modal-test').is(':visible'), 'modal visible')
- $('#modal-test').click()
+ $('#modal-test').mousedown()
})
.on('hidden.bs.modal', function () {
ok(!$('#modal-test').is(':visible'), 'modal hidden')
@@ -174,7 +174,7 @@ $(function () {
div
.on('shown.bs.modal', function () {
triggered = 0
- $('#modal-test').click()
+ $('#modal-test').mousedown()
})
.on('hide.bs.modal', function () {
triggered += 1