Fix collapsing submenus issue

This commit is contained in:
Hans Hillen 2011-04-22 23:14:04 +02:00
parent 42e11d8e41
commit 84f918ae44

View File

@ -283,17 +283,15 @@ $.widget("ui.menu", {
}, },
_open: function(submenu) { _open: function(submenu) {
clearTimeout(this.timer);
this.element.find(".ui-menu").not(submenu.parents()).hide().attr("aria-hidden", "true"); this.element.find(".ui-menu").not(submenu.parents()).hide().attr("aria-hidden", "true");
var position = $.extend({}, { var position = $.extend({}, {
of: this.active of: this.active
}, $.type(this.options.position) == "function" }, $.type(this.options.position) == "function"
? this.options.position(this.active) ? this.options.position(this.active)
: this.options.position : this.options.position
); );
submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position); submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position);
this.active.find(">a:first").addClass("ui-state-active"); this.active.find(">a:first").addClass("ui-state-active");
}, },