1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 18:44:01 +02:00

change dropdown strategy to use an overlay - fixes mobile click anywhere + allows for firefox middle click

This commit is contained in:
fat
2013-05-16 12:50:06 -07:00
parent bdbd268cb9
commit 92245e8bc7
9 changed files with 362 additions and 438 deletions

View File

@@ -104,7 +104,7 @@ $(function () {
.dropdown()
.click()
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
$('body').click()
$('.dropdown-backdrop').click()
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class removed')
dropdown.remove()
})
@@ -136,13 +136,13 @@ $(function () {
first.click()
ok(first.parents('.open').length == 1, 'open class added on click')
ok($('#qunit-fixture .open').length == 1, 'only one object is open')
$('body').click()
$('.dropdown-backdrop').click()
ok($("#qunit-fixture .open").length === 0, 'open class removed')
last.click()
ok(last.parent('.open').length == 1, 'open class added on click')
ok($('#qunit-fixture .open').length == 1, 'only one object is open')
$('body').click()
$('.dropdown-backdrop').click()
ok($("#qunit-fixture .open").length === 0, 'open class removed')
$("#qunit-fixture").html("")