mirror of
https://github.com/twbs/bootstrap.git
synced 2025-10-03 16:51:54 +02:00
add preventDefault support for all inital event types (show, close, hide, etc.) + fix small bug with scrollspy.last
This commit is contained in:
16
js/tests/unit/bootstrap-tab.js
vendored
16
js/tests/unit/bootstrap-tab.js
vendored
@@ -42,4 +42,20 @@ $(function () {
|
||||
equals($("#qunit-fixture").find('.active').attr('id'), "home")
|
||||
})
|
||||
|
||||
|
||||
test("should not fire closed when close is prevented", function () {
|
||||
$.support.transition = false
|
||||
stop();
|
||||
$('<div class="tab"/>')
|
||||
.bind('show', function (e) {
|
||||
e.preventDefault();
|
||||
ok(true);
|
||||
start();
|
||||
})
|
||||
.bind('shown', function () {
|
||||
ok(false);
|
||||
})
|
||||
.tab('show')
|
||||
})
|
||||
|
||||
})
|
Reference in New Issue
Block a user