Skip to content

Commit 993a079

Browse files
committed
Merge branch 'master' of git://github.com/jquery/jquery-ui
2 parents 6222205 + 6326da3 commit 993a079

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

themes/base/jquery.ui.menu.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@
2626
.ui-menu .ui-menu-item a {
2727
text-decoration:none;
2828
display:block;
29-
padding:.2em .4em;
29+
padding: 2px .4em;
3030
line-height:1.5;
3131
zoom:1;
32-
}
33-
.ui-menu .ui-menu-item a {
3432
font-weight: normal;
3533
}
3634
.ui-menu .ui-menu-item a.ui-state-focus,

ui/jquery.ui.menu.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ $.widget("ui.menu", {
237237
// need to remove the attribute before adding it for the screenreader to pick up the change
238238
// see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
239239
this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant", self.itemId)
240+
241+
// highlight active parent menu item, if any
242+
this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
240243

241244
self.timer = setTimeout(function() {
242245
self._close();
@@ -285,8 +288,6 @@ $.widget("ui.menu", {
285288
);
286289

287290
submenu.show().position(position);
288-
289-
this.active.find(">a:first").addClass("ui-state-active");
290291
},
291292

292293
closeAll: function() {

0 commit comments

Comments
 (0)