Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfat <jacobthornton@gmail.com>2012-12-23 01:57:57 +0400
committerfat <jacobthornton@gmail.com>2012-12-23 01:57:57 +0400
commit2c0ed072b07f79eb617f15062f52fa349e95305d (patch)
treee5833b1f7ee9f79b132a1957f71708f7341e3a11 /js
parent4d195222d46c21fe31dfa1246bdb11474476b36d (diff)
shifting focus to parent and adding aria menuitem for dropdown
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-dropdown.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js
index 914eabde75..14e01cd5af 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)