1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-18 11:21:23 +02:00

shifting focus to parent and adding aria menuitem for dropdown

This commit is contained in:
fat
2012-12-22 13:57:57 -08:00
parent 4d195222d4
commit 2c0ed072b0
6 changed files with 73 additions and 64 deletions

View File

@@ -81,7 +81,10 @@
isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
$items = $('[role=menu] li:not(.divider):visible a', $parent)