From 2c0ed072b07f79eb617f15062f52fa349e95305d Mon Sep 17 00:00:00 2001 From: fat Date: Sat, 22 Dec 2012 13:57:57 -0800 Subject: shifting focus to parent and adding aria menuitem for dropdown --- js/bootstrap-dropdown.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 914eabde7..14e01cd5a 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -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) -- cgit v1.2.3