aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
diff options
context:
space:
mode:
authorJohann <[email protected]>2017-03-27 10:08:39 +0200
committerGitHub <[email protected]>2017-03-27 10:08:39 +0200
commit24924c23b24c1b196c42166ebe9a17d31f0ee720 (patch)
treefe26db99160914ddb6cd4047bd70e7d12f49e5a3 /js/tests/unit
parent8edfe0ff561eab8b2610db6f161afa913ed8cb7b (diff)
downloadbootstrap-24924c23b24c1b196c42166ebe9a17d31f0ee720.tar.xz
bootstrap-24924c23b24c1b196c42166ebe9a17d31f0ee720.zip
Collapse - do not prevent event for input and textarea
Diffstat (limited to 'js/tests/unit')
-rw-r--r--js/tests/unit/collapse.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index a7bcaad9c..01bc5adb9 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -513,4 +513,20 @@ $(function () {
})
$target.trigger($.Event('click'))
})
+
+ QUnit.test('should not prevent event for input', function (assert) {
+ assert.expect(2)
+ var done = assert.async()
+ var $target = $('<input type="checkbox" data-toggle="collapse" data-target="#collapsediv1" />').appendTo('#qunit-fixture')
+
+ $('<div id="collapsediv1"/>')
+ .appendTo('#qunit-fixture')
+ .on('shown.bs.collapse', function () {
+ assert.ok($target.attr('aria-expanded') === 'true')
+ assert.ok($target.prop('checked'))
+ done()
+ })
+
+ $target.trigger($.Event('click'))
+ })
})