diff options
| author | Heinrich Fenkart <[email protected]> | 2014-09-08 22:23:43 +0200 |
|---|---|---|
| committer | Heinrich Fenkart <[email protected]> | 2014-09-08 22:23:43 +0200 |
| commit | 787404e09077724a20f58eb915d9397714f6d5d0 (patch) | |
| tree | 67769159833c45b6127a7a137c7f80ba38cc813f | |
| parent | 6cec0399d0580f54cea5043a32ba7bb0868ac235 (diff) | |
| parent | 18c0a1c9774e0b726813b578a5046a30d0681e33 (diff) | |
| download | bootstrap-787404e09077724a20f58eb915d9397714f6d5d0.tar.xz bootstrap-787404e09077724a20f58eb915d9397714f6d5d0.zip | |
Merge pull request #14287 from hnrch02/revert-13855-modal-mousedown
Revert #13855 due to #14263
| -rw-r--r-- | js/modal.js | 2 | ||||
| -rw-r--r-- | js/tests/unit/modal.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/js/modal.js b/js/modal.js index 38fa89edd..d0426b01b 100644 --- a/js/modal.js +++ b/js/modal.js @@ -169,7 +169,7 @@ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') .appendTo(this.$body) - this.$element.on('mousedown.dismiss.bs.modal', $.proxy(function (e) { + this.$element.on('click.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 6c48ed44b..2262465a4 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -141,7 +141,7 @@ $(function () { notEqual($('#modal-test').length, 0, 'modal insterted into dom') $('.contents').click() ok($('#modal-test').is(':visible'), 'modal visible') - $('#modal-test').mousedown() + $('#modal-test').click() }) .on('hidden.bs.modal', function () { ok(!$('#modal-test').is(':visible'), 'modal hidden') @@ -196,7 +196,7 @@ $(function () { $('<div id="modal-test"><div class="contents"/></div>') .on('shown.bs.modal', function () { triggered = 0 - $('#modal-test').mousedown() + $('#modal-test').click() }) .on('hide.bs.modal', function () { triggered += 1 |
