]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Allow listbox AIRA role on dropdown component. 11825/head
authorScott Plumlee <scott@plumlee.org>
Tue, 10 Dec 2013 16:17:43 +0000 (11:17 -0500)
committerScott Plumlee <scott@plumlee.org>
Tue, 10 Dec 2013 19:17:32 +0000 (14:17 -0500)
js/dropdown.js

index 3f71c7569bff91d44f25425473e9fd2a1bdaa876..0a210ef355bde3fa0426a47d22210bfe77134e46 100644 (file)
@@ -77,7 +77,8 @@
       return $this.click()
     }
 
-    var $items = $('[role=menu] li:not(.divider):visible a', $parent)
+    var desc = ' li:not(.divider):visible a'
+    var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
 
     if (!$items.length) return
 
     .on('click.bs.dropdown.data-api', clearMenus)
     .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
     .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
-    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+    .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]' , Dropdown.prototype.keydown)
 
 }(jQuery);