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:
5
js/bootstrap-dropdown.js
vendored
5
js/bootstrap-dropdown.js
vendored
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user